Re: how to return the number of rows from mysql_fetch_object

From: Date: Fri, 13 Oct 2000 02:15:09 +0000
Subject: Re: how to return the number of rows from mysql_fetch_object
Groups: php.general 
Request: Send a blank email to php-general+get-19937@lists.php.net to get a copy of this message
Hi, Well.... $query = mysql_query("select * from table"); $result = mysql_num_rows($query); if ($result < 1) { echo "No Results"; exit; } $result = mysql_fetch_object($query); mysql_num_rows ... should always be called before taking in the results... you might land up with no result index if the result set is 0 ... --- Matthew Delmarter <matt@adplusonline.com> wrote: > What is the most efficient way to return the number > of rows from the result > of a mysql_fetch_object query? > > Regards, > Matthew Delmarter > > > -- > 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 > ===== To Find Out More About Me : http://mukul.tsx.org/ __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.general (#19937) next »