Advertisement
sebbu

sql viewtopic

Nov 14th, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $sql='SELECT p2.`titre`, p2.`description`, p2.`moderator`, p3.`sujet`, '.
  2. 'p2.`fid`, p1.`pid`, p4.`uid`, p4.`username`, p4.`avatar` , p4.`grade` , p1.`message`, p4.`signature`, '.
  3. 'p1.`status`, p3.`status` AS `t_status`, p1.`time` AS `timestamp` '.
  4. 'FROM `forums_title` AS p2'.
  5. ' LEFT JOIN `forums_topics` AS p3 ON p2.`fid`=p3.`fid`'.
  6. ' LEFT JOIN `forums` AS p1 ON p1.`tid`=p3.`tid`'.
  7. ' LEFT JOIN `users` AS p4 ON p1.`uid`=p4.`uid`'.
  8. 'WHERE p1.`tid`="'.$id.'" '.
  9. 'ORDER BY p1.`pid` ASC;';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement