Advertisement
sebbu

sql forumindex

Nov 14th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $sql='SELECT p2.`fid`, p2.`titre`, p2.`description`, p1.`uid`, p4.`username`,'.
  2. ' p1.`tid`, p1.`time` AS `timestamp`, p3.`sujet`, p2.`nb_topics`, p2.`nb_posts`, p2.`p_fid`'.
  3. ' FROM `forums_title` AS p2'.
  4. ' LEFT JOIN `forums` AS p1 ON p1.`pid`=p2.`last_pid`'.
  5. ' LEFT JOIN `forums_topics` AS p3 ON p1.`tid`=p3.`tid`'.
  6. ' LEFT JOIN `users` AS p4 ON p1.`uid`=p4.`uid`'.
  7. ' ORDER BY p2.`fid` ASC;';
  8. //' p5.`fid` AS `fid2`, p5.`titre` AS `titre2`'. /* <-- select | from --> */' LEFT JOIN `forums_title` AS p5 On p2.`fid`=p5.`p_fid`'.
  9. //' WHERE p2.`p_fid`='0''.
  10. //$sql2='SELECT `fid`, `titre`, `description`, `nb_topics`, `nb_posts` FROM `forums_title` ORDER BY `fid` ASC;';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement