Did you try to print the content of the variable?
What does it contain?
On Tue, 29 Jul 2003 13:29:10 -0400
"Mike At Spy" <[EMAIL PROTECTED]> wrote:
>
> Hey, I've got a weird issue. I have some code, an MySQL statement, that
> returns an empty set, like this:
>
> $person = mysql_query("Some Statement Here");
>
> So, then I have an if/else statement:
>
> 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.
>
> Hence all of the 'OR' conditions. I would have have thought !$person would
> be enough.
>
> Thanks for any input! :)
>
> -Mike
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Lucas Lain
[EMAIL PROTECTED]
# /Scripting/Manager (??) && /Obscure/Commander
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php