j'ai cette table :
Code : Tout sélectionner
CREATE TABLE IF NOT EXISTS `linked_topics` (
`linked_id` int(10) unsigned NOT NULL auto_increment,
`topic_id` mediumint(8) unsigned NOT NULL,
`linked_topic` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`linked_id`),
KEY `topic_id` (`topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
Le probleme c'est que j'ai bien reussi a faire une requete qui me renvoi les informations necessaire lorsque l'on affiche le sujet dont l'id est contenu dans topic_id de la table linked_topics.
Code : Tout sélectionner
SELECT `linked_topics`.`linked_topic`,
`topics`.`title` AS topic_title,
`categories`.`title` AS category_title
FROM (`linked_topics`, `topics`)
INNER JOIN `categories` ON (`categories`.`category_id` = `topics`.`category_id` AND `topics`.`topic_id` = `linked_topics`.`linked_topic`)
WHERE `linked_topics`.`topic_id` = %1$dSi vous avez une idée,
Merci,
Netsupra