RE: [PHP] Counting

From: Date: Mon, 17 Sep 2001 19:21:29 +0000
Subject: RE: [PHP] Counting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67637@lists.php.net to get a copy of this message
why not use it in your sql? select count(*) from table where foo='bar'; -----Original Message----- From: Max Mouse [mailto:maxmouse@maxmouse.org] Sent: Monday, September 17, 2001 5:22 PM To: php forum Subject: [PHP] Counting I'm using php/mysql. I want to be able to count the number of records that match something. I've used mysql_num_rows() and it does work, but is there a better way? Something like COUNT(*)? I've tried to use it, but all I get is Resource ID #1 or something similar. Any ideas for the best way to do this? Max -- 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 (#67637) next »