Hi, guys. I’ve been looking all over the net for the following, but I can’t find anything mostly because the search term is saturated and difficult. Anyway.
I need to custom order records on a MySQL database. jQuery might make this really cool, but the core lesson, is how to custom order records.
For example, take these fields:- ID, title, content, order
ID will be auto-incrementing obviously. but I want “order” to be auto incrementing also as new posts are insterted into the table.
AND I need to be able to change the order of these records… for display purposes. (i.e to show some records before other ones).. so I can display the records by ORDER BY ‘order’ ASC or DESC .
I’m finding it difficult to work out how to do this. bearing in mind some records will get deleted. jQuery will make this a great tut also, I we can drag and drop records over and under each other to re-order them, which will change the ‘order’ fields of all the records. But any simpler take would be more appreciated.
I’ve emailed Jeffrey Way this, but I thought I’d write it here for others to see.
Thanks, Jeff, yeah I do have an order field. Besides, I have that side of things taken care of now, after a couple of days.
The rest will involve jQuery, which is where your link comes in handy.
Just what I was looking for. Thanks a lot!
EDIT : haven taken a quick skim through the link, its greater than what i expected and needed in the first place..