RE: [PHP] Bizarre SQl, if issue....
| From: | Ford, Mike [LSS] | Date: | Tue, 29 Jul 2003 18:06:43 +0000 |
| Subject: | RE: [PHP] Bizarre SQl, if issue.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157362@lists.php.net to get a copy of this message | ||
> -----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