I'm writing program on PHP with MySQL database. First of all I have a query and than I call mysql_query("my query variables") function that creates an array. How can I check if the array is empty or not. I need this checking for if statement.
Thanks
$query = "select * from table;"; $result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) == 0) { echo "No results"; } else { echo "There are results"; }
thanks "stolzyboy"