CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How to perform case insensitive search from within CCS using PostgreSQL?

Print topic Send  topic

Author Message
teufel

Posts: 13
Posted: 07/01/2004, 1:47 PM

Hi,

This is an old one, though I found no answers to it.....

When performing a query, CCS only gives you the opportunity to specify that a query is "some_field" LIKE {'%some_value%'}.

The way PostgreSQL does case insensitive searches is by using the ILIKE operator. Unfortunately this is not available at the DataSource window when the DataSourceType is set to TABLE.

Also, ILIKE operator does not treat equaly characters such as Ä and ä or A and ä, as MySQL would do.

Example: if using MySQL, just stick with LIKE and you are fine => if you have Mädchen in your database, it does not matter if you search for MADCHEN, madchen, mädchen or Mädchen, it will all return the entry for Mädchen.

Now how would I do that with PostgreSQL (from within CCS?).

By doing the following custom coding inside event BeforeBuildSelect,

Quote :
global $grid;

if ($grid->ds->Where <> "") {
$grid->ds->Where = str_replace("like", "ilike", $grid->ds->Where);
}

I can achieve the following: searching for mädchen would return the entry for Mädchen, as would searching for MäDCHEN as well. But searching for MÄDCHEN would return nothing (assuming the value in the database is written Mädchen).

Also, depending on the solution adopted, this may impact performance, indexing, etc., or???

Any PostgreSQL experts out there willing to help?
_________________
--teufel
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.