RE: [PHP] Bizarre SQl, if issue....
| From: | Jay Blanchard | Date: | Tue, 29 Jul 2003 17:31:06 +0000 |
| Subject: | RE: [PHP] Bizarre SQl, if issue.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157344@lists.php.net to get a copy of this message | ||
[snip]
$person = mysql_query("Some Statement Here");
if (!$person || $person == 0 || $person == '' || $person == '0') {
$result =
1; }
else { $result = 4; }
If the SQL statement returns an empty set, shouldn't $result be equal to
1?
Instead, I'm getting $result = 4.
[/snip]
Actually I think we need to see the query == "Some Statement Here".
$person in this case is either TRUE or FALSE