$this->db->query问题
$this->db->query("select password from person where name =? ",$_POST["name"]);这样的语法错吗?
下面是我显示的错误:
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
select password from person where name = 请仔细看手册:
$sql = "SELECT * FROM some_table WHERE id = ? AND status = ? AND author = ?";
$this->db->query($sql, array(3, 'live', 'Rick'));
你看看你的和手册例子一样吗?
http://codeigniter.org.cn/user_guide/database/queries.html
页:
[1]