I have a db query, which show datas from mysql database.
I want to do : ıf number of rows from query is bigger than x do something if small do another thing. Namely;
$qry = mysql_query("SELECT * FROM data_table WHERE page='$page'",$dbh);
$total = mysql_num_rows($qry);
if($total>7)
{
something...
}
else{
another thing;
}
but it always going to first statement whatever $total is. I echo the $total. It gives 8.
What is wrong?