RE: [PHP] Bizarre SQl, if issue....

From: Date: Tue, 29 Jul 2003 17:37:22 +0000
Subject: RE: [PHP] Bizarre SQl, if issue....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157347@lists.php.net to get a copy of this message
Here's the SQL - I tested it via command line and it comes back empty set. SELECT ID FROM tblItems WHERE number = $place Does that help? -Mike > -----Original Message----- > From: Jay Blanchard [mailto:jay.blanchard@niicommunications.com] > Sent: Tuesday, July 29, 2003 1:31 PM > To: Mike At Spy; php-general@lists.php.net > Subject: RE: [PHP] Bizarre SQl, if issue.... > > > [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 > >

« previous php.general (#157347) next »