Welcome Guest, Not a member yet? Register   Sign In
Searching in codeigniter
#2

[eluser]Jeremy Gimbel - Conflux Group[/eluser]
If you want to search a larger text field in your database for your $tag variable, you'll need to do something like this:

Code:
$this->db->like(‘title’, "%" . $tag . "%");

This basically says to look for $tag surrounded by any other characters. You can adjust accordingly if you want to include spaces around the word (ie. just searching for that word, not part of another word), etc.


Messages In This Thread
Searching in codeigniter - by El Forum - 11-13-2009, 05:53 AM
Searching in codeigniter - by El Forum - 11-29-2009, 07:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB