SQL Case sensitivity

From: Date: Wed, 23 Jun 2004 19:14:40 +0000
Subject: SQL Case sensitivity
Groups: php.general 
Request: Send a blank email to php-general+get-188897@lists.php.net to get a copy of this message
I hope I don't get too chastised for a double post ( posted in .db first ), but I'm hoping someone can help me. I'm using PHP with ADOdb ( and an MS Access 2000 db ) to write a simple SQL statement but was running into some case sensitivity issues. Here's my SQL currently: SELECT autoQuesID,fldQuesTitle,fldBody FROM tblFAQ_Question WHERE fldBody LIKE '%$strSearchFor%'; All I'm trying to do is have the users search string searched for in the "fldBody" field. However, I'm having problems trying to get it so that the search is case-insensitive. For instance: If I search on "Airline", I get 1 record. If I search on "airline", I get 0 records. I make the value of $strSearchFor lower case ( using strtolower() ), but I don't know how to get it so that the contents of the "fldBody" field is lower case also. I can't seem to find any functions or operators that remove the case-sensitivity. However, I have tried this where clause to no avail: WHERE LCase(fldBody) LIKE '%$strSearchFor%' Any help would be much appreciated!

« previous php.general (#188897) next »