i used the following code:
SELECT [columns1]
FROM [table1]
WHERE upper(table1.column1)
LIKE upper('%$form[searched_item]%') ORDER BY column1 ASC;
this way you may search the string, without having restrictions in any of both.
instead of the $form[...] yoy may use any PHP variable you have the searchable string in.
Anders wrote:
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 D😎
I'm using DB2, PHP4.
Thanks in advance.
Anders