$SQL = "SELECT 'password' FROM 'table' WHERE 'username' = '".$user."';"; $result = mysql_query($db,$SQL,$cid); With the above you then do a: $pass = mysql_fetch_object($result); $pass->passord //is the password then... .bobo ----- Original Message ----- From: "Exiang" <allentan@pd.jaring.my> To: <php-windows@lists.php.net> Sent: Wednesday, September 10, 2003 3:00 PM Subject: mysql+php query Hi, i hav a problem query a data value from my database every setting is fine. the database is working too.just i dunno how to do it with php let say i hav a username and a password in my database i wanto query the password with given username $SQL = "SELECT `password` FROM `table` WHERE `username` = '$user';"; $result = mysql_db_query($db,"$SQL",$cid); but the result i hav is a Resource id #4 but not the value of password that i wan. Pls help me..thanx. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php