Re: simple web search

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: simple web search
Дата
Msg-id 784381.72635.qm@web54306.mail.yahoo.com
обсуждение исходный текст
Ответ на simple web search  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Ответы Re: simple web search  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Re: simple web search  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-sql
> I'm considering implementing a search box on my review web site 
> http://lesculturelles.net and am looking for a simple way to match 
> entered words against several columns on related tables:
> show.show_name, story.title, person.firtname, person.lastname, etc.

one solution would be a view:

create view search_v as select 'show'::name as tab_nm, show_id as tab_pk, 'Show Name' as description, show_name as
searchfrom show
 
union select 'story'::name, story_id, 'Story Title', title from story
union ...

your query would be select * from search_v where '$string' ilike search

this would return a list the user could use to drill down further.

many ways to skin this cat.



____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: simple web search
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: simple web search