Re: Query Case In-sensitive

From: Date: Tue, 18 Nov 2003 06:59:44 +0000
Subject: Re: Query Case In-sensitive
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31608@lists.php.net to get a copy of this message
you can convert both of the sides to one case, similar to this: select item_number from item where upper (item_code) = upper ("M1234"); this way you ensure that both the value in the database and the selection variable are in one and the same case: capital. this should work in just about every single database, there's always a function to convert a string to upper case, the syntax might be different to the above example (which is mysql). just consult your dbms documentation. ciao, andrei . "Larry Sandwick" <lgs@sarreid.com> 2003/11/17 09:53 PM Please respond to <lgs@sarreid.com> To <php-db@lists.php.net> cc Subject [PHP-DB] Query Case In-sensitive Is there a way to run a query so that it ignores the case, and the query is not case sensitive? The data being stored is "m1234" Query Select item number from item where item_code = "M1234" ; The query above should return the data above. TIA Larry Sandwick Sarreid, Ltd. Network/System Administrator phone: (252) 291-1414 x223 fax : (252) 237-1592

« previous php.db (#31608) next »