如何解决此错误?
SELECT user_id, CONCAT(firstname, ' ', lastname) AS fullname FROM user AND status = '1' in .../database/mysql.php on line 49
这是实际代码:
$query = $this->db->query("SELECT user_id, CONCAT(firstname, ' ', lastname) AS fullname FROM " . DB_PREFIX . "user " . $except . " AND status = '1'");
我已检查过这些字段,我的所有用户在其个人资料中都有姓/名。
答案 0 :(得分:0)
你需要一个where子句 - 而不仅仅是以AND
开头$query = $this->db->query("SELECT user_id
, CONCAT(firstname, ' ', lastname) AS fullname
FROM " . DB_PREFIX . "user " . $except . "
WHERE status = '1'");
答案 1 :(得分:0)
尝试将 AND 替换为 WHERE - 我认为这会做你要做的事情