RE: [PHP] Num rows error

From: Date: Wed, 11 Oct 2000 00:04:29 +0000
Subject: RE: [PHP] Num rows error
Groups: php.general 
Request: Send a blank email to php-general+get-19432@lists.php.net to get a copy of this message
> this is the code. > > > $check = "SELECT * FROM list WHERE email = '$email'"; > $query = mysql_query($check); > $num_rows = mysql_num_rows($query); > > if ($num_rows) > $email_exitst=1; > > im getting an error that says this... > > Supplied argument is not a valid MySQL result resource > > and b4 you say it, I used mysql_error() and it didnt come up > with anything, There's no mysql_connect or mysql_pconnect in this code. If you haven't connected to the database you can't query it. Jason

« previous php.general (#19432) next »