Non case-sensitive SQL Query
| From: | Anders Dannberg | Date: | Fri, 18 Aug 2000 10:44:06 +0000 |
| Subject: | Non case-sensitive SQL Query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2148@lists.php.net to get a copy of this message | ||
Hi all!
I need some help on how to make a NON case-sensitive sql query. I use the
following query which outputs what i need:
$query = "SELECT * FROM user INNER JOIN maintable ON user.number =
maintable.number WHERE name LIKE 'Anders%'";
However, as this is case-sensitive, it will not display, for example records
containing "anders", but only "Anders" etc.
Is there a way i can make sql-queries NON case-sensitive (without changing
the already inputted data in the DB)
Is there a way i can do this in within the code? Without any changes to
database settings...
I'm using DB2, PHP4.
Thanks in advance.
Anders