why is search case sensitive here?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
someguyhere
Forum Contributor
Posts: 181
Joined: Sun Jul 27, 2008 3:24 pm

why is search case sensitive here?

Post by someguyhere »

Code: Select all

	   $searchSql[] = "`company_description` LIKE '%". $wpdb->escape($_POST['keywords']) ."%'";  
When I run the search, Widegts will show up in the results, but widgets won't. What do I need to change to make it case insensitive?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: why is search case sensitive here?

Post by Celauran »

Check the collation in your table.
someguyhere
Forum Contributor
Posts: 181
Joined: Sun Jul 27, 2008 3:24 pm

Re: why is search case sensitive here?

Post by someguyhere »

Can you be more specific? Check it for what?
someguyhere
Forum Contributor
Posts: 181
Joined: Sun Jul 27, 2008 3:24 pm

Re: why is search case sensitive here?

Post by someguyhere »

Disregard, I overlooked something.
Post Reply