Welcome Guest, Not a member yet? Register   Sign In
how to do this query
#7

[eluser]Clooner[/eluser]
[quote author="gebe" date="1276829361"]Hi Clonner, I already read the document, but is not enought for do my query.
I try with or_where, where_in, etc, etc

Exactly siubie I need the query:

WHERE (field=x OR field IS NULL) AND field_2 = b[/quote]

From the manual
Code:
$where = "name='Joe' AND status='boss' OR status='active'";
$this->db->where($where);

change it into
Code:
$where = "(name='Joe' OR status='active') AND status='boss' ";
$this->db->where($where);


Messages In This Thread
how to do this query - by El Forum - 06-17-2010, 02:37 PM
how to do this query - by El Forum - 06-17-2010, 03:04 PM
how to do this query - by El Forum - 06-17-2010, 03:30 PM
how to do this query - by El Forum - 06-17-2010, 03:48 PM
how to do this query - by El Forum - 06-17-2010, 03:49 PM
how to do this query - by El Forum - 06-17-2010, 03:50 PM
how to do this query - by El Forum - 06-17-2010, 03:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB