why not use it in your sql?

select count(*) from table where foo='bar';

-----Original Message-----
From: Max Mouse [mailto:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to