pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: case insensitive search
5+ messages / 5 participants
[nested] [flat]
* case insensitive search
@ 2002-03-15 06:31 arun kv <arun@library.iisc.ernet.in>
2002-03-15 06:24 ` Re: case insensitive search Gurudutt <guru@indvalley.com>
2002-03-15 17:36 ` Re: case insensitive search Jon Hassen <jhassen@azstarnet.com>
0 siblings, 2 replies; 5+ messages in thread
From: arun kv @ 2002-03-15 06:31 UTC (permalink / raw)
To: pgsql-php
hello,
how to do a case insensitive search on postgresql database. i will
enter a keyword in text field and it has to search for that keyword in
keywords field of table and should be case insensitive.
can i use egrei() function. if so how.here two attributes should be
strings. but first attribute i will get from previous php page and second
attribute is field name of database table. how do i do this.
pls help me
thanking you
Arun
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: case insensitive search
2002-03-15 06:31 case insensitive search arun kv <arun@library.iisc.ernet.in>
@ 2002-03-15 06:24 ` Gurudutt <guru@indvalley.com>
2002-03-15 17:33 ` Re: case insensitive search knut.suebert@web.de
1 sibling, 1 reply; 5+ messages in thread
From: Gurudutt @ 2002-03-15 06:24 UTC (permalink / raw)
To: arun kv <arun@library.iisc.ernet.in>; +Cc: pgsql-php
Hello arun,
ak> how to do a case insensitive search on postgresql database. i will
ak> enter a keyword in text field and it has to search for that keyword in
ak> keywords field of table and should be case insensitive.
why don't you use "ilike" to search for the pattern in the database.
--
Best regards,
Gurudutt mailto:guru@indvalley.com
Life is not fair - get used to it.
Bill Gates
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: case insensitive search
2002-03-15 06:31 case insensitive search arun kv <arun@library.iisc.ernet.in>
2002-03-15 06:24 ` Re: case insensitive search Gurudutt <guru@indvalley.com>
@ 2002-03-15 17:33 ` knut.suebert@web.de
0 siblings, 0 replies; 5+ messages in thread
From: knut.suebert@web.de @ 2002-03-15 17:33 UTC (permalink / raw)
To: pgsql-php
Gurudutt schrieb:
> Hello arun,
>
> ak> how to do a case insensitive search on postgresql database. i will
> ak> enter a keyword in text field and it has to search for that keyword in
> ak> keywords field of table and should be case insensitive.
>
> why don't you use "ilike" to search for the pattern in the database.
or POSIX:
4.6.2. POSIX Regular Expressions
Table 4-10. Regular Expression Match Operators
Operator Description Example
~ regex, case sensitive 'thomas' ~ '.*thomas.*'
~* regex, case insensitive 'thomas' ~* '.*Thomas.*'
!~ not regex, case sensitive 'thomas' !~ '.*Thomas.*'
!~* not regex, case insensitive 'thomas' !~* '.*vadim.*'
G,
K
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: case insensitive search
2002-03-15 06:31 case insensitive search arun kv <arun@library.iisc.ernet.in>
@ 2002-03-15 17:36 ` Jon Hassen <jhassen@azstarnet.com>
1 sibling, 0 replies; 5+ messages in thread
From: Jon Hassen @ 2002-03-15 17:36 UTC (permalink / raw)
To: arun kv <arun@library.iisc.ernet.in>; pgsql-php
Have you looked in the manual?
Try: 'where ILIKE 'searchword';
At 12:01 PM +0530 3/15/02, arun kv wrote:
>hello,
> how to do a case insensitive search on postgresql database. i will
>enter a keyword in text field and it has to search for that keyword in
>keywords field of table and should be case insensitive.
>
>can i use egrei() function. if so how.here two attributes should be
>strings. but first attribute i will get from previous php page and second
>attribute is field name of database table. how do i do this.
> pls help me
> thanking you
> Arun
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: case insensitive search
@ 2002-03-15 17:40 timothy_maguire@hartehanks.com
0 siblings, 0 replies; 5+ messages in thread
From: timothy_maguire@hartehanks.com @ 2002-03-15 17:40 UTC (permalink / raw)
To: Jon Hassen <jhassen@azstarnet.com>; +Cc: arun kv <arun@library.iisc.ernet.in>; pgsql-php; pgsql-php-owner@postgresql.org
I also use the ~* operator for situations like these
select * from table
where field ~* 'searchterm'
and ....
Tim.
Timothy P. Maguire
Web Developer II
Harte-Hanks
978 436 3325
Jon Hassen
<jhassen@azstarnet. To: arun kv <arun@library.iisc.ernet.in>, PGSQL
com> <pgsql-php@postgresql.org>
Sent by: cc:
pgsql-php-owner@pos Subject: Re: case insensitive search
tgresql.org
03/15/2002 12:36 PM
Have you looked in the manual?
Try: 'where ILIKE 'searchword';
At 12:01 PM +0530 3/15/02, arun kv wrote:
>hello,
> how to do a case insensitive search on postgresql database. i will
>enter a keyword in text field and it has to search for that keyword in
>keywords field of table and should be case insensitive.
>
>can i use egrei() function. if so how.here two attributes should be
>strings. but first attribute i will get from previous php page and second
>attribute is field name of database table. how do i do this.
> pls help me
> thanking you
> Arun
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
HARTE- HANKS PRIVILEGED AND CONFIDENTIAL INFORMATION- if you are not the
addressee or authorized to receive this for the addressee, you must not
use, copy, disclose or take any action based on this message or any
information herein and should delete this message.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2002-03-15 17:40 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-15 06:31 case insensitive search arun kv <arun@library.iisc.ernet.in>
2002-03-15 06:24 ` Gurudutt <guru@indvalley.com>
2002-03-15 17:33 ` knut.suebert@web.de
2002-03-15 17:36 ` Jon Hassen <jhassen@azstarnet.com>
2002-03-15 17:40 Re: case insensitive search timothy_maguire@hartehanks.com
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox