Discussion board
How can we find the number of rows in a result set using PHP?
By
Sir,
how to find the number of rows in a result set...
Reply
Post   Reset
Teacher SiliconIndia replied to Wednesday, November 04, 2009
Naveen,

Here is how can you find the number of rows in a result set using PHP:

$result = mysql_query($any_valid_sql, $database_link);
$num_rows = mysql_num_rows($result);
echo "$num_rows rows found";