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
When you say it "returns TRUE," how are you testing that? You're not by any chance doing something like this, are you?
$result = mysql_query($sql);
if ($result == TRUE) { /* stuff */ }
If so, keep in mind that all non-zero, non-blank, non-null value that is returned will evaluate to TRUE. You can verify this by using the more stringent:
if ($result === TRUE) { /* stuff */ }
That evaluates not just equivalence, but type as well. Are you doing something like a var_export($result); to check the data type and verify that you're actually getting back the boolean value of TRUE?