Is it possible to group and_where / or_where / or_like… statements together so as not to mix with other and/where statements.
Something that would result in
WHERE city = ‘My City’ AND state = ‘My State’ AND (name LIKE %name1%
OR name LIKE %name2%)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
$this->db->where()allows you to write clauses manually. You could do this:Setting the third parameter for false prevents CodeIgniter from trying to add backticks to the clause.
Check out the Active Record documentation. The section titled $this->db->where(); explains the four methods you can use to set WHERE clauses.