How to check result is empty or not in php - PHP Views : 266
Tagged in : PHP
0 0
Send mail
Here the code to check the number of rows in a result and to check whether the result set is empty or not

$user_res=mysql_query($query);
$rows=mysql_num_rows($user_res);//Used to find no.of rows in a resultset
if($rows==0){
echo "Resultset is empty";
}
By Vinoth, On - 2010-02-05



    Login to add Comments .