Jump to content

Reorder forum topics by last post? OR Suggest a better script.


chinclub

Recommended Posts

I have a very basic forum script that came with a virtual pet community script I bought.

 

Right now it calls new topics by:

 

$sql = mysql_query("SELECT * FROM `forum` WHERE `threadID`='0' AND ORDER BY `id` DESC");

 

and it calls replies by:

 

$replies = mysql_num_rows(mysql_query("SELECT * FROM `forum` WHERE `threadID`='$id' "));

 

For this reason it lists posts on the main page by the order they were created.  I would rather them be placed in the order of date, however, since the main script calls by threadID=0 it won't look at the date of the replies.  Is there a way to call the database and include all threadIDs in the ORDER BY section?

 

If not does anyone know of a very simple forum PHP script that I can replace this one with that would be easy to tie into my existing database of members that might have a bit more  features (such as order by replies, smilies, maybe even font colors <- dare I dream!  ;D )

 

I am still very new at PHP so I need something easy to manipulate.

 

THANKS! :D

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.