Welcome Guest, Not a member yet? Register   Sign In
Active record complex where statement troubles
#2

[eluser]champs[/eluser]
Code:
$this->db->select('john_field, bert_field, harry_field');
$this->db->from('chum_table');
$this->db->where("(john_field = 'test1' OR john_field = 'test2')");
$this->db->where("(bert_field = test3 OR bert_field = test4)");
$this->db->where("(harry_field = 'test5' OR harry_field = 'test6')");

In this case, you should also run $this->db->escape_str() on any input variables.


Messages In This Thread
Active record complex where statement troubles - by El Forum - 08-02-2007, 08:37 AM
Active record complex where statement troubles - by El Forum - 08-02-2007, 01:22 PM
Active record complex where statement troubles - by El Forum - 08-02-2007, 01:36 PM
Active record complex where statement troubles - by El Forum - 08-03-2007, 04:40 AM
Active record complex where statement troubles - by El Forum - 08-03-2007, 05:52 AM
Active record complex where statement troubles - by El Forum - 08-03-2007, 03:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB