You are here: Re: Joining many results from one table with one result from another in one query « PHP SQL « IT news, forums, messages
Re: Joining many results from one table with one result from another in one query

Posted by J.O. Aho on 02/23/06 18:26

Piotr Chmielewski wrote:
> I've got some lexicon-like application which stores data in 2 tables:
> lexicon( id, description ) and keywords(lexicon_id, keyword)
> This is flexible solution because there may be many keywords
> for one description. My problem is how to make ONE query, that
> will return description with given id, along with ALL keywords
> referencing to this description (keywords of course joined in
> one string, separated by a space or comma or any other character)
> Is it possible to achieve using MySQL 5? Maybe some subquery?
> I'll be grateful for any answer.

Do a select on keywords.keyword and left join lexicon

http://dev.mysql.com/doc/refman/5.0/en/join.html


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация