|
Posted by Piotr Chmielewski on 02/23/06 20:41
Uzytkownik "J.O. Aho" <user@example.net> napisal w wiadomosci news:46661nF9mkohU1@individual.net...
> Do a select on keywords.keyword and left join lexicon
>
> http://dev.mysql.com/doc/refman/5.0/en/join.html
>
Still I dont know how to extract ALL keywords linked to one description
in just one query... Lets say we have:
CREATE TABLE `keywords` (
`lexicon_id` int(11) NOT NULL default '0',
`keyword` varchar(32) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `keywords` VALUES (1, 'pascal');
INSERT INTO `keywords` VALUES (1, 'basic');
CREATE TABLE `lexicon` (
`id` int(11) NOT NULL auto_increment,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
INSERT INTO `lexicon` VALUES (1, 'Well known programming language.');
then I want result like:
|description|keywords|
|Well known programming language.|pascal, basic|
Please gimme example or some clue if its possible at all
Piotr
[Back to original message]
|