Jump to content


Recommended Posts

Here are my forums that I have been working on. I have four slight issues with it however, if the community can help fix these issue or maybe even add-on and improve to it, everyone who uses MCCodes V2 will be able to use it. 

What's different about this forum? -

  • It uses JBBCode
  • Images added to make it look nice

Issues - 

  1. When viewing all topics duplicate topics show
  2. When moving, deleting post/topic it needs to update the  `forums_forums` table, field `ffLT`  with the last topic posted if no topic within that forum set it as 0
  3. When viewing all topics the table should be ordered in from last post I can't seem to do it correctly.
  4. Page numbers don't work as I don't know how to do it.



    $q = $db->query(
                    "SELECT  `ft`.`ftID`, `ft`.`ftFFID`, `ft`.`ftNAME`, `ft`.`ftVIEWS`, 
                    `ft`.`ftUSER`, `ft`.`ftTIME`, `ft`.`ftPINNED`, `ft`.`ftLOCK`, `fp`.`fpTIME`
                     FROM `forum_topics` `ft`
                     INNER JOIN `forum_posts` `fp`
                     ON `ft`.`ftID` = `fp`.`fpFTID`
                     WHERE `ft`.`ftFFID` = {$_GET['viewforum']}
                     AND `ft`.`ftDELETED` = 0
                     ORDER BY `ft`.`ftPINNED`, `fp`.`fpTIME`");

So this is the query I created. 


I want the forum topic to be ordered in the table by the last post which is in a different table. Am I going to the right direction?

Using the query above gives me duplicate entries

Edited by Samurai Legend
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...