Re: MySQL problem

From: Date: Fri, 22 Feb 2002 07:52:58 +0000
Subject: Re: MySQL problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17185@lists.php.net to get a copy of this message
On Fri, 2002-02-22 at 09:37, Caleb Walker wrote: > 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); Try this out: $q = mysql_query("SELECT FName, LName FROM user_info WHERE (FName='$FName' && LName='$LName')",$db) || die(1); ^^^ It might help. Or it might not :) Cheers, Markus -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library markus.lervik@vaasa.fi +358-6-325 3589 / +358-40-832 6709

« previous php.db (#17185) next »