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

From: Date: Tue, 29 Jul 2003 18:32:25 +0000
Subject: RE: [PHP] Bizarre SQl, if issue....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157372@lists.php.net to get a copy of this message
Nothin' wrong with the SQL statement - it executes properly when I enter values that actually pull something from a table. When I enter values that are not present in the table, I go on to have the other issue of it looking like it is false, though it is not. :\ -Mike > -----Original Message----- > From: Jay Blanchard [mailto:jay.blanchard@niicommunications.com] > Sent: Tuesday, July 29, 2003 2:24 PM > To: Mike At Spy; Ford, Mike [LSS]; php-general@lists.php.net > Subject: RE: [PHP] Bizarre SQl, if issue.... > > > [snip] > 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 > [/snip] > > Is the query executing properly? Try this ... > > $sql = "SELECT ID from tblItems WHERE number = '" . $place . "' > "); > if(!($person = mysql_query($sql, $connect_variable))){ > print(mysql_error() . "\n"); > exit(); > } > > It is a verbose test > >

« previous php.general (#157372) next »