Welcome Guest, Not a member yet? Register   Sign In
active record doubt
#5

[eluser]Aken[/eluser]
or_where and or_like need to be used in conjunction with a where/like respectively to add the OR functionality. You can use a custom query string inside the where() function to get what you need.

Code:
$this->db->where("num_field = 'search_word' OR text_field LIKE '%search_word%'", NULL, FALSE);
$this->db->get('table');


Messages In This Thread
active record doubt - by El Forum - 09-10-2009, 01:05 AM
active record doubt - by El Forum - 09-10-2009, 01:50 AM
active record doubt - by El Forum - 09-10-2009, 01:52 AM
active record doubt - by El Forum - 09-10-2009, 03:19 AM
active record doubt - by El Forum - 09-10-2009, 03:54 AM
active record doubt - by El Forum - 09-10-2009, 04:48 AM
active record doubt - by El Forum - 09-10-2009, 07:09 PM
active record doubt - by El Forum - 09-11-2009, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB