This might seem ridiculously simple, but I've been getting all kinds of error depending on how I handle a query that returns nothing.
$query = "SELECT * FROM messages WHERE id > ".$messageId;
$result =mysql_query($query);
$time = time();
while(time()-$time<60 && $result==false)
{
$result = mysql_query($query);
}
if(result != false)
//Encode response
else
//return nothing
How do I check whether my mysql_query() returned anything?