select pour phpbb (affichage du dernier message par categori
Posté : 09 mai 2005, 22:44
bonsoir, j'ai trouvé le script select suivant :
SELECT
phpbb_categories.cat_id,
phpbb_categories.cat_title,
phpbb_posts_text.post_id,
phpbb_posts_text.post_subject,
phpbb_posts_text.post_text,
phpbb_posts.post_id
FROM phpbb_posts_text,phpbb_posts,phpbb_categories
c
WHERE phpbb_posts.forum_id=phpbb_categories.cat_id
and phpbb_posts_text.post_id=phpbb_posts.post_id
Mais par contre il met tout en vrac, je voudrais voir uniquement une selection d'une categorie par exemple la N°16
donc j'ai rajouté apres
phpbb_categories.cat_id in (".$phpbb_posts_text.post_id($post_id,$where).")
et la ca ne marche plus du tout
Quelqu'un aurait-il une idée ?
SELECT
phpbb_categories.cat_id,
phpbb_categories.cat_title,
phpbb_posts_text.post_id,
phpbb_posts_text.post_subject,
phpbb_posts_text.post_text,
phpbb_posts.post_id
FROM phpbb_posts_text,phpbb_posts,phpbb_categories
c
WHERE phpbb_posts.forum_id=phpbb_categories.cat_id
and phpbb_posts_text.post_id=phpbb_posts.post_id
Mais par contre il met tout en vrac, je voudrais voir uniquement une selection d'une categorie par exemple la N°16
donc j'ai rajouté apres
andWHERE phpbb_posts.forum_id=phpbb_categories.cat_id
and phpbb_posts_text.post_id=phpbb_posts.post_id
phpbb_categories.cat_id in (".$phpbb_posts_text.post_id($post_id,$where).")
et la ca ne marche plus du tout
Quelqu'un aurait-il une idée ?