Re: how to tell if a returned returned query has results,

From: Date: Sat, 24 Jun 2000 20:42:58 +0000
Subject: Re: how to tell if a returned returned query has results,
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2931@lists.php.net to get a copy of this message
Hi, function isEmpty($result) { if(mysql_num_rows($result) > 0) { return false; } else { return true; } then in your own function just call this function with the result of your query. Test the result and insert an echo "the search ......"; The rest is up to you.... with regards, Tijmen david.tansley@acelondon.co.uk wrote: > Hello, > > Apart from seeing the screen output, how can you test that the > returned results from a query (mysql) does not have any rows, so you > can inform inform the user with a friendly message, saying "... > the search to not return any results".. > > Thanks > > D.T. > ________________________________________________________________________ > > CONFIDENTIALITY This e-mail and any attachments are confidential and may > also be privileged. If you are not the intended recipient(s) please note > that any distribution, copying or use of this communication or the > information in it is strictly prohibited.If you are not the named > recipient(s), please notify the sender immediately and do not disclose > the contents to another person, use it for any purpose, or store or > copy the information in any medium. > > > ************ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#2931) next »