Results 1 to 2 of 2
Thread: Next / previous topic
Aug 11, 2001, 04:01 #1
Next / previous topic
I'm write a message board at the moment, and I have a problem with my thread view. I want a link while viewing a thread to the next and the previous topic. I suppose I have to sort the thread table on posttime, but how do I jump to the next and previous? Is that something like this:
select * from $table[threads] where forumid='$currentforumid' and threadid='$currentthreadid' order by posttime desc
I suppose I have to now jump to the row +1 and -1, but how do I do that?
Aug 11, 2001, 04:59 #2
- Join Date
- Jul 2000
- 0 Post(s)
- 0 Thread(s)
Basically, when you query your database, do soemthing like
whereby $offset and $limit are the deciding variables for where to start and end (of rows in the table) the query.
look to the article at www.phpbuilder.com which addresses this problem.
http://www.phpbuilder.com/columns/rod20001214.php3"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein