Databases: searching for a word in entries containing multiple words using 'like' |
Okay, so, as my actual code involves a complicated JOIN and I couldn't get the SQL query to work, what I've ended up doing is the following:
Code: $this->db->where('title LIKE ', $search.'%'); CI's inbuilt like and or_like seem to be pretty limited when it comes to arguments (before, after, both, none), but utilising where and or_where does the trick for my needs. Thanks for all your help and suggestions pointing me in the right direction. |
Welcome Guest, Not a member yet? Register Sign In |