I have for example this query:
SELECT *
FROM example
WHERE (column_1 = 1 OR column_1 = 2)
AND (column_2 = 12 OR column_2 = 3)
How can I write it on Codeigniter?
I think something like:
$where = column_1 = 1 OR column_1 = 2;
$this->db->where($where);
$where2 = column_2 = 12 OR column_2 = 3;
$this->db->where($where2);
(I need to separate between each AND)
Is this ok? I don't have an idea how I can see the query as string only.