Re: WHERE problem

From: Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: WHERE problem
Date: 2003-02-18 16:53:31
Message-ID: 3E52650B.30103@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik wrote:

>Hi all,
>
>I need to select rows from a table with a condition. I did it like this:
>
>SELECT message, date, author FROM table WHERE author='$author'
>
>$author is a variable. Works fine. But what am I gonna do if I want to
>select those rows where $author also can be a part of author. For example,
>If the user fills in "bush" I want postgresql also to select "george bush".
>
>How would I do that?
>
>thanks,
>
>Erik
>
>-- http://hg.shuis.tudelft.nl --
> RLU #300477
>
>
>
>

Use regular expressions with LIKE or POSIX syntax (see online
documentation for full syntax information).
It is pretty simple.

Regards,

Hans

--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>

Browse pgsql-general by date

  From Date Subject
Next Message Raphael Bauduin 2003-02-18 17:07:57 pg and chroot (performance)
Previous Message Tim Stump 2003-02-18 16:19:30 Re: nodeRead: did not find '}' at end of plan node