jset_expert
asked on
PHP MSSQL DB Like statments are case sensitive
Hi,
I have developed a simple SQL search system that uses LIKE "%a%" conditions
The search works fine on my dev platform, (Win XP / PHP / Apache / SQL 2005)
But on the clients platform (Win Server 2003 / PHP / Apache / SQL 2000) the search is case sensitive
Can any help me as to why this might be?
I have developed a simple SQL search system that uses LIKE "%a%" conditions
The search works fine on my dev platform, (Win XP / PHP / Apache / SQL 2005)
But on the clients platform (Win Server 2003 / PHP / Apache / SQL 2000) the search is case sensitive
Can any help me as to why this might be?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's not the collation, but a setting within the collation settings page. That sounded better in my head. IIRC, it is one of the options available when you select binary comparison.
Changing the database collation is fairly painful for existing data, but easy for new data.
http://support.microsoft.com/kb/325335
When using upper() or lower() ensure you use it on both sides.
http://support.microsoft.com/kb/325335
When using upper() or lower() ensure you use it on both sides.
ASKER
I see if I can change the collation, if not I will incorporate the UPPER or LOWER functions