phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Follow Up: Questions from New User/Develop


From: Chris Weiss
Subject: Re: [Phpgroupware-developers] Follow Up: Questions from New User/Developer
Date: Fri, 22 Feb 2002 00:22:00 +0000

Or even better, use ILIKE instead of LIKE
http://www.postgresql.org/idocs/index.php?functions-matching.html

(not bad for a non-pg guy)


Ashleigh Gordon (address@hidden) wrote*:
>
>Thanks for quick help. From what I've found, it looks like postgresql
>doesn't have a global parameter to have case insensitive searches. So
>I've made a quick hack in the query string in
>class.contacts_sql.inc.php, to make it case insensitive. Here it is:
>
>        /* Replace $sql .= " $f LIKE '%$query%' OR "; with */
>        $sql .= " $f LIKE '%$query%' OR $f LIKE lower('%$query%') OR $f
>LIKE upper('%$query%') OR $f LIKE initcap('$query%') OR ";
>
>This does makethe query rather large however, but it will do for now
>
>I've also attached my update and insert triggers. In order to enable
>triggers in postgresql, at the command prompt, type "createlang plpgsql
>phpgroupware". I think that I should probably document this and some
>other things to make it a bit easier for others. Who is currently
>co-ordinating/working on the documentation? I think that I could
>probably write the documentation for the addressbook now if you would like.
>
>Ashleigh Gordon
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]