| From: | Johan Daine <isis(at)wanadoo(dot)be> |
|---|---|
| To: | Patrick Coulombe <pcoulombe(at)mediacces(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: LIKE upper('%$info%') -- (like google) |
| Date: | 2001-05-27 02:41:17 |
| Message-ID: | 3B10694D.FD6E4B63@wanadoo.be |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Patrick Coulombe wrote:
> how can i search my database like a search engine (ie google).
>
> -- $info= patrick coulombe
> -- select distinct * from friends where upper(name) LIKE upper('%$info%')
>
> i want postgresql to find :
>
> -- patrick lefevre
> -- coulombe caroline
> -- patrick coulombe
> -- coulombe patrick
>
> you get the idea...
> thank you :)
> patrick
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
Try something lile
select * from friends where name ~* '(Patrick)|(Coulombe)' ;
>
> http://www.postgresql.org/users-lounge/docs/faq.html
--
_/ /_/_/_/ Johan Daine
_/ /_/ _/ mailto:isis(at)wanadoo(dot)be
_/ /_/ _/ http://thot.dyndns.org:6080
_/ /_/ _/
_/ /_/ _/
/_/_/_/ /_/_/_/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stoffel van Aswegen | 2001-05-28 05:37:53 | RE: Table joining problem. |
| Previous Message | GCS | 2001-05-26 20:22:34 | Table joining problem. |