According to the manual of mysql_query() and to everything I know about this function that I used so many times, it can either return a resource or FALSE if the
mysql_query doesn't return FALSE, let alone TRUE. It returns a resource id that if equates to zero, con be taken as FALSE. My example is to illustrate boolean results
$resource = mysql_query($query, $handle);
if (!$resource) throw some exception;
if (!$resource && strpos($query, 'SELECT')) {
throw new Exception('mysql_query() returned TRUE for SELECT');
}
PHP Booleans