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
<?
  print mysql_error();
?>
after  $result = mysql_query($sql);

HTH
   Gianluca

JF> newbie to MySQL...

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

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


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


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


JF> Many Thanks in advance
JF> Justin French




--
ALBASOFTWARE
C/ Mallorca 186 - 3 1
08036 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
@@ ICQ 47323154 @@
[EMAIL PROTECTED]
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.com


-- 
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