在codeIgniter中使用mysql密码功能的流程是什么?
我的控制器
$where = array(
"studentid" => $this->input->post('username'),
"password" => "password('".$this->input->post('password')."')",
"status" =>1
);
$user = $this->void->getData("users",$where);
我的模型函数
public function getData($table,$where,$order = 'id')
{
$this->db->order_by($order);
$this->db->where($where);
$query=$this->db->get($table);
return $query->result();
}
这是行不通的。这正在生成以下查询,因为您可以看到问题
SELECT * FROM (`users`) WHERE `studentid` = '054418' AND `password` = 'password(\'054418\')' AND `status` = 1 ORDER BY `id`
请帮我解决。提前感谢您的帮助