I have tried that and I don't get an error, but I don't get any records
returned either. And I have lowered the search string like you
mentioned. Here's what I tried ( Access syntax ):
SELECT autoQuesID,fldQuesTitle,fldBody
FROM tblFAQ_Question
WHERE LCase(fldBody) LIKE '%$strSearchFor%';
Nicole Swan wrote:
Have you tried lowering the fldBody as well? Like:
SELECT autoQuesID,fldQuesTitle,fldBody
FROM tblFAQ_Question
WHERE LOWER(fldBody) LIKE '%$strSearchFor%';
And $strSearchFor has already been lowered, of course.
--Nicole
---------------------------
Nicole Swan
Web Programming Specialist
Carroll College CCIT
(406)447-4310
-----Original Message-----
From: Gabe [mailto:ydnahg-news4432@xxxxxxxxxxxxxx]
Sent: Wednesday, June 23, 2004 8:59 AM
To: php-db@xxxxxxxxxxxxx
Subject: SQL help
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.
Any help would be much appreciated!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php