Friday, July 11, 2008

How to find mysql query returned row count using php

You can find affected or returned row(tuple) count of a mysql query using php built in function mysql_num_rows()


$result = mysql_query("SELECT * FROM MyTable");
$rows = mysql_num_rows($result);

echo $rows;





Get custom programming done at GetAFreelancer.com!

No comments:

Post a Comment