RE: [PHP] Bizarre SQl, if issue....
| From: | Mike At Spy | Date: | Tue, 29 Jul 2003 18:21:12 +0000 |
| Subject: | RE: [PHP] Bizarre SQl, if issue.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157367@lists.php.net to get a copy of this message | ||
I did the var_dump and got:
bool(false)
While $vthere (from my previous post) returns 0 (zero) still. :\
But proceeds as if 0 were a false statement when asked if $vthere equals
zero. :\
-Mike
> -----Original Message-----
> From: Ford, Mike [LSS] [mailto:M.Ford@lmu.ac.uk]
> Sent: Tuesday, July 29, 2003 2:07 PM
> To: 'Mike At Spy'; Ford, Mike [LSS]; php-general@lists.php.net
> Subject: RE: [PHP] Bizarre SQl, if issue....
>
>
> > -----Original Message-----
> > From: Mike At Spy [mailto:spycobalt@spyproductions.com]
> > Sent: 29 July 2003 19:01
> >
> > Off hand, I would agree. And that is what I would expect.
> >
> > However, the *exact* same setup on a different server gives
> > me a result of
> > 'FALSE' properly. The other server has php 4.3.3 on it - the
> > one giving the
> > improper response has php 4.1.2.
>
> Hang on -- it's not clear to me which server is giving which response.
>
> Just to be clear, the proper response is to deliver a resource id
> if the query is valid, or FALSE if not. Could it be that one
> server is consistently giving you a resource ID of 0, and the
> other isn't? (I'm not even sure if a resource ID of zero is
> equivalent to a real zero, or what the result of doing an if
> ($resource_id) on it would be, but this might be a straw to
> clutch at!). To see *exactly* what's being returned into $person
> from your mysql_query(), try doing var_dump($person).
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS, LS6 3QS, United Kingdom
> Email: m.ford@lmu.ac.uk
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>