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%'";
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%'";
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
Forget that last comment.
Have a read here, there are many methods:
http://dev.mysql.com/doc/refman/5.1/en/case-sensitivity.html
that would do the trick
The query I posted above would work however there are better methods on that page. Have a read.
Hope this helps
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.