Re: MySQL problem

From: Date: Sat, 23 Feb 2002 17:49:38 +0000
Subject: Re: MySQL problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17224@lists.php.net to get a copy of this message
It means there is a problem with your query. I'm not familiar with the die(1) and die (2) syntax. I'm not sure what that does, but you might try echoing your error message from the query to see what message you get. Hope that helps. "Caleb Walker" <cwalker@cwalk.org> wrote in message news:200202220737.g1M7bkI08288@cwalk.org... > I keep on getting this error statement: > Warning: Supplied argument is not a valid MySQL result resource in > /usr/local/www/data/phone/insert2.php on line 10 > 2 > > Can someone tell me what is wrong with the code below, I just cannot figure > it out... Thank you very much in advance. I am using php4. > > <html> > <? > session_start(); > include("info.inc.php"); > > mysql_connect("$host","$user","$pass") || die(mysql_error()); > mysql_select_db("$db") || die(mysql_error()); > > > $q = mysql_query("SELECT FName, LName FROM user_info WHERE (FName='$FName' && > LName='$LName')") || die(1); > $view = mysql_fetch_array($q) || die(2); > ?> > > <?=$view[0]?> > </html>

« previous php.db (#17224) next »