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

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

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