RE: [PHP-DB] Non case-sensitive SQL Query

From: Date: Fri, 18 Aug 2000 16:13:16 +0000
Subject: RE: [PHP-DB] Non case-sensitive SQL Query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2162@lists.php.net to get a copy of this message
> > -----Original Message----- > > From: Anders Dannberg [mailto:anders.dannberg@edk.se] > > Sent: Friday, August 18, 2000 12:44 > > To: php-db@lists.php.net > > Subject: [PHP-DB] Non case-sensitive SQL Query > > > 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) I'm not specifically familiar with DB2...does it provide any capabilities to do string manipulation within the query? In MySQL, one could do something like ...where upper(name) like 'ANDERS%'... --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell

« previous php.db (#2162) next »