SELECT COUNT( * ) AS numrows
FROM (
books
)
WHERE (
id_status =1
OR id_status =2
)
AND company =2
如何转换为CI Active Record?
答案 0 :(得分:1)
$this->db->select('count(*) as numrows')->from('books ')->where("(id_status='1' OR id_status='2') and company ='2'")