[eluser]Monarobase[/eluser]
Hello,
I'm building a search form and want users to be able to search for more than one words...
(The product names could be
new-product-name or
new product-name or
new, pruduct ! name)
Using preg_replace I remove all bad characters and replace the with a wildcard to get something like this :
Code:
$searchfor = 'new%product%name';
I wanted to look for it using :
Code:
if($searchstring != '') $this->db->like('prodname', $searchfor, 'both');
But the wildcard characters are escaped and no products are returned. I was thinking about expanding the active record library but I have noticed that it's in the database folder and not in the library folder. How would I go about doing this ? should I create a MY_DB_active_rec.php in my appications library folder ? Or could you recommend another approach to get the right search results ?
Thanks.