[eluser]PeterPan[/eluser]
Hi,
I used CI for some month now and I am getting used to it... slowly
There is one thing I am not sure about whether it is a mistake by the built in Active Record Class or by me.
The where/orwhere statements are always grouped, so it is impossible to write such things as:
SELECT *
FROM table
WHERE a = b
AND statement LIKE &#xwh;atsoever%
OR a = b
AND statement LIKE 
n;ythingelse%;
Using the code
Code:
$this->db->from('table');
$this->db->where('a', 'b');
$this->db->like('username', $filter);
$this->db->orlike('email', $filter);
$this->db->where('a', 'b');
$query = $this->db->get();
or even
Code:
$this->db->from('table');
$this->db->where('a', 'b');
$this->db->like('username', $filter);
$this->db->orwhere('a', 'b');
$this->db->like('email', $filter);
$query = $this->db->get();
the Active Record Class groups the WHERE statements together and combines my LIKE statements with an AND ;(
Thanks in advance!