MyBB Community Forums

Full Version: How do you (SQL and board question)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you sort Threads by thier Subject name?

getting thier values and then sort them to thier names?

example I want the "Post message, Post date, Post Subject Title" to show and then sorted them into thier Subject name. how do you do this?

and yes if this Sorting has many pages? example I have 700 post and want to just show 10 per page... how does this work?

I really dont know much about php and SQL but I wiling to learn this..

thanks Smile
bump ?

last post was 9-11-06

please help... Sad
The sorting is easy. You can just use a query like...

SELECT * FROM threads ORDER BY subject

To do pagination, your PHP code would need to calculate a "start" variable based on the current page number, and then you could use it in your SQL query to specify which rows to return...

SELECT * FROM threads ORDER BY subject LIMIT $start, $perpage

You could always look at the MyBB source code to see how it's done there... Toungue