RE: [PHP] false select

From: Date: Wed, 28 Jun 2000 20:20:41 +0000
Subject: RE: [PHP] false select
Groups: php.general 
Request: Send a blank email to php-general+get-3657@lists.php.net to get a copy of this message
> I'm confused.. > I'm trying to construct a function that will branch depending > on wether a record is found or not. > What I have currently is: The way I do it is this: $query = "SELECT joe FROM bob WHERE this = 'that'"; $result = mysql( $dbname, $query ); if(( $result ) && ( mysql_errno() == 0 )) { // do what you gotta do } else { // display an error } Or some version thereof, depending on the block and where I am in the code. Chris

« previous php.general (#3657) next »