yeah that kinda works... what i have is
$result = mysql($database "select x, y, z from $table where a and b and c;", $link); if ($result == empty set){ $z = NULL; } else $x = mysql_result($result, 0, "x"); $y= mysql_result($result, 0, "y"); $z = mysql_result($result, 0, "z"); } i have 1 row in my table. this row contains legit values for a, b, and c so when i set $result to NULL or 0 or whatever it goes into the ELSE statement but when select returns "Empty Set (0.02 sec)" it gives me this: Warning: Unable to jump to row 0 on MySQL result index# in Location-of-file.php On Wednesday, June 5, 2002, at 12:20 PM, Anil Garg wrote: > have u tried with \0 ?? > ----- Original Message ----- > From: "Chris Hohimer" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 05, 2002 1:54 PM > Subject: help with empty set > > >> using PHP what is the value for a returned result from MySQL of "empty >> set" >> ex: >> >> if($result != NULL){ >> do this >> } >> else{ >> do that >> } >> >> but NULL is not right. what should I replace NULL with? >> >> >> >> --------------------------------------------------------------------- >> Before posting, please check: >> http://www.mysql.com/manual.php (the manual) >> http://lists.mysql.com/ (the list archive) >> >> To request this thread, e-mail <[EMAIL PROTECTED]> >> To unsubscribe, e-mail > <[EMAIL PROTECTED]> >> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php >> > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php