Re: [PHP] mySQL query grief

2001-07-22 Thread Gianluca Baldo
Justin - there's an error in your query. I think it should be: $sql = "SELECT * FROM staff WHERE id='$username'"; Anyway, to see which is the problem just after $result = mysql_query($sql); HTH Gianluca JF> newbie to MySQL... JF> I get this error: JF> Supplied argument is not a valid MySQ

[PHP] mySQL query grief

2001-07-22 Thread Justin French
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 = "juddy