codeigniter ActiveRecord where statement issue
问题 is have this statement and i want to make it by the Active Records way in codeigniter DELETE FROM TABLE (col1 = value AND col2 = value2 ) OR (col1 = value2 AND col2 = value ); 回答1: CodeIgniter Active Record is impractical for mixing AND's and OR's within a query. You will likely need to construct some of the query manually, e.g. something along the lines of: $this->db->where("col1 = $value AND col2 = $value2"); $this->db->or_where("col1 = $value2 AND col2 = $value"); Alternately, in your