RE: [PHP-WIN] Quick One... determining if there are no results re turned

From: Date: Tue, 05 Sep 2000 21:43:04 +0000
Subject: RE: [PHP-WIN] Quick One... determining if there are no results re turned
Groups: php.windows 
Request: Send a blank email to php-windows+get-2443@lists.php.net to get a copy of this message
ummm, doesn't PHP return FALSE or 0 if there are no rows returned . . . I seem to remember getting a lot of "0 is not a valid result identifier" messages early on! If this is the case, you can do what you are trying with just one call. John T. Foley Network Administrator Pollak Engineered Products, Actuator Products Division, A Stoneridge Company 195 Freeport Street, Boston MA 02122 ph: (617) 474-7266 fax: (617) 282-9058 The geographical center of Boston is in Roxbury. Due north of the center we find the South End. This is not to be confused with South Boston which lies directly east from the South End. North of the South End is East Boston and southwest of East Boston is the North End. > -----Original Message----- > From: Asendorf, John [SMTP:JAsendorf@lcounty.com] > Sent: Tuesday, September 05, 2000 11:13 AM > To: php-windows@lists.php.net > Subject: RE: [PHP-WIN] Quick One... determining if there are no > results re turned > > Hmmmm... I'm using odbc_num_rows (); > > and I always get -1 > > any clues? > > --------------------- > John Asendorf - jasendorf@lcounty.com > Web Applications Developer > http://www.lcounty.com - CHECK OUT THE NEW LOOK! > Licking County, Ohio, USA > 740-349-3631 > > > > -----Original Message----- > > From: Flint Doungchak [mailto:Flint@netsolutionsllc.com] > > Sent: Tuesday, September 05, 2000 10:52 AM > > To: 'Asendorf, John' > > Cc: php-windows@lists.php.net > > Subject: RE: [PHP-WIN] Quick One... determining if there are > > no results > > re turned > > > > > > Hello, > > > > Try using something like: > > > > $num = mysql_num_rows($SQL_request); > > > > $num will then equal the total number of rows returned. You > > can then use num > > in your if then else statements. I hope this is what you wanted. > > > > -Flint > > > > -----Original Message----- > > From: Asendorf, John [mailto:JAsendorf@lcounty.com] > > Sent: Tuesday, September 05, 2000 7:43 AM > > To: php-windows@lists.php.net > > Subject: [PHP-WIN] Quick One... determining if there are no results > > returned > > > > > > Here's a quick one... I wasted all my time finding chop() on > > my own this > > morning so someone has to help me find the expression I need here... > > > > I just need to know if the return from an SQL call is empty... > > > > e.g. > > > > if $SQL_request is empty { > > do one thing > > } > > else { > > do another thing > > > > } > > > > Anyone? > > > > --------------------- > > John Asendorf - jasendorf@lcounty.com > > Web Applications Developer > > http://www.lcounty.com - CHECK OUT THE NEW LOOK! > > Licking County, Ohio, USA > > 740-349-3631 > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > >

« previous php.windows (#2443) next »