extraído de
www.php.net/mysql_query
Código:
mysql_query() will also fail and return FALSE if the user does not have permission to access the table(s) referenced by the query.
lo que hace eso es si la consulta retorna FALSE (!$sql) hacer algo, por ejemplo avisarle al usuario o algo.
Saludos,
Cx