“字段列表”中的未知列'userpass'

时间:2012-01-18 00:21:58

标签: php mysql phpmyadmin mysqladmin

我正在开展以下项目:http://lpmj.net/20.php

我已经在phpMyadmin中输入了几个条目,并且习惯于使mySQL和php对应,但是由于这个错误,我不知道代码要求的是什么。

这是我收到的错误:

  

“字段列表”中的未知列'userpass'

任何帮助,这表明将不胜感激。

2 个答案:

答案 0 :(得分:3)

这意味着userpass不存在。检查你的拼写并确保它确实存在

答案 1 :(得分:3)

这意味着您的字段列表 - 单词SELECT之后的内容 - 指的是名为userpass的列,但该列不存在于您的表中重新选择。例如,您的查询可能如下所示:

SELECT userpass FROM foo;

它应该看起来像其中之一:

SELECT userpass FROM bar;  -- was looking in the wrong table
SELECT user_pass FROM foo; -- mistyped the name of the column