Author Topic: database/ forum  (Read 1415 times)


  • Guest
database/ forum
« on: October 24, 2013, 08:39:28 pm »

 I have a forum with a database involving categories and topics..... the users (some are given administrator privilege) can create categories/topics.  The problem that I have is when you view the topics is only shows the latest topic.  I would like to view all the topics.  Topics are all listed in the sql database according to topic_id's.  I was wondering if I needed to create an array that would show all the topics in a specific category.  Then the user could choose the topic and continue the discussion.  I would also like to have the topics listed newest first (on top), not last, save scrolling. 

Any help would be appreciated.

I answered my own question, except for posts showing the last reply date first.
« Last Edit: October 27, 2013, 10:38:58 am by mt81832 »


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 492
Re: database/ forum
« Reply #1 on: November 20, 2013, 06:22:53 am »
I am not sure what your query looks like but you should be able to sort the results based on reply date, assuming that it is stored in the database table. You can order by the date column. Here is an example: http://stackoverflow.com/questions/7215022/php-and-mysql-order-by-most-recent-date-and-limit-10 and http://stackoverflow.com/questions/3376458/php-mysql-sort-by-date-newest
Jenna Setticasi
The Art Institute of Pittsburgh | Online Division
Associate Professor, Web Design and Interactive Media