mysql - 获取箭头并将变量设置为某一行

时间:2011-03-22 09:40:48

标签: mysql

我无法弄清楚为什么$ points返回没有值

$query = mysql_query("SELECT * FROM `username` WHERE `password` = '$pword' AND `username` = '$uname'");
$rows = mysql_fetch_array($query);
$points = $rows[points]; 

1 个答案:

答案 0 :(得分:0)

尝试使用SELECT points FROM用户名WHERE密码= '$pword' AND用户名= '$uname'并检查$ pword和$ nname值是否传递值

$points = $rows['points'];