0

making php code to pull data for database now it pulls most data fine with the like statment now is there anyway to make it pull both things that are lower and uper case ?

$query = "SELECT * FROM `users` WHERE `$lookby` LIKE '%$lookfor%'";
2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Designer_101
0

Hi
Just done some reading, give this a try:

$query = "SELECT * FROM `users` WHERE `$lookby` COLLATE latin1_general_cs LIKE '%$lookfor%'";

If not then comment back and il show you how to edit your mysql table to be case in-sensitive.

Hope this helps

0

The query I posted above would work however there are better methods on that page. Have a read.

Hope this helps

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.