Hi all,

newbie to MySQL...

I get this error:
Supplied argument is not a valid MySQL result resource in /usr/local/
blah blah blah

>From this query:
$username = "juddy2";
$sql = "SELECT * FROM staff WHERE id=".$username;
$result = mysql_query($sql);


However, this works okay:
$username = "juddy2";
$sql = "SELECT * FROM staff";
$result = mysql_query($sql);


So, I guess my WHERE... stuff is wrong.  I just want to retrieve the
whole row of information relating to a certain user (eg juddy2).  The
usernames are unique in the table, contained in a column called "id".


Many Thanks in advance
Justin French

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to