Hello John,

Wednesday, February 25, 2004, 5:53:13 PM, you wrote:

JTJ> Here is my code. $sql works correctly, but am not sure I did this line correct:
JTJ> $glquery = mysql_query($sql);
JTJ> because "if ($glquery)" always returns something. I want to know if it returns 
NULL.

mysql_query will return FALSE if the query is invalid.

If the query is perfectly valid SQL, but just doesn't return
anything, then you need to use mysql_num_rows() instead - if this is
equal to nothing then nothing was returned.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to