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

[eluser]Aken[/eluser]
After a little research, you should be able to use a LIKE command with no wild cards just as you would a "WHERE = something" command. However, there's no option to use the $this->db->like() function without any wildcard placement.

You can, however, use a very minor custom query string inside an or_where() function:

Code:
$search = 'search_word';

$this->db->where('num_field', $search);
$this->db->or_where('text_field LIKE', "%$search%");
$query = $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