这是codeignitor中的MySQL查询
$query = $this->db->select('stu_id as id, CONCAT(UCASE(stu_fname), " ", UCASE(stu_mname), " ", UCASE(stu_lname), " - ", stu_id) as text')
->like('stu_fname', $this->input->get("q"), 'after')
->or_like('stu_mname', $this->input->get("q"), 'after')
->or_like('stu_lname', $this->input->get("q"), 'after')
->where('stu_status', '0')
->limit(10)
->from('student')
->get();
一切正常,我收到搜索结果,但WHERE
条件不起作用,stu_status = 1
行没有被省略,这里我只想要stu_status = 0
行。任何人都可以帮助解决问题吗?