I'm creating my own forum system.
Right now, I'm using a database structure somewhat similair to phorum.
My relavant fields for each post are:
id int auto_increment primary
parent int
Now, any post with '0' in it's field is a topic is a new topic and may or may not have children.
I want to add numbers at the bottom of my page like, << 1 2 3 4 5 >>
These will let you navigate through the posts by topic.
Now, the problem is, I only care about getting the topics, not the children of topics. But I can't find a good way of only nabbing the ID's of new topics.
I need to find a good algorithm/php-mysql function that will loop through the total number of posts with '0' as a parent, divide this by the number of posts I show per page, and create a variable I can place in my URL that will let me display the topics poast the given point.