tags:

views:

65

answers:

1

I want to know how many results have been fetched from mysql through my query...

+5  A: 

This is done by calling mysql_num_rows on a mysql result resource:

$result = mysql_query("SELECT id, name FROM users");
print mysql_num_rows($result) . " records";
Jonathan Sampson
Damn. Go to sleep, this was mine!
Paolo Bergantino
Sleep is for the weak! :)
Jonathan Sampson
It's all good. I'm awake programming ColdFusion. *shudder* Anyhow, added links to the docs, hope you don't mind. :)
Paolo Bergantino
Appreciated .
Jonathan Sampson