I have the following query
$query = ('select * from small_images where page_number = "5"'); $result2 = mysql_query($query); $SI_result = mysql_fetch_array($result2); $num_rows=????
how do I check for the number of rows returned?
thanks
$query = ('select * from small_images where page_number = "5"'); $result2 = mysql_query($query); $SI_result = mysql_fetch_array($result2); $num_rows=mysql_num_rows($result2);
You can also use the COUNT() function in mysql 🙂