php在MYsql中查询的问题??
我想在数据中根据某个值查询对应的值.例:知道user的值然后显示pwd的值。我在phpamdin里面测试的代码是:
$sql = 'SELECT pwd'<br /> . ' FROM `appdata` '<br /> . ' WHERE user = \'jimmy@qq.com\' LIMIT 0, 30';
<?php<br /> include_once "logindatabase.php";<br /> $cmd = mysql_query(SELECT * FROM appdata WHERE user =jimmy@qq.com);<br /> $rec = mysql_fetch_array($cmd);<br /> echo $rec[Pwd];<br /> ?>