Jump to content

move up/move down


dreed75

Recommended Posts

I have a php/mysql page that people can add articles to and I want the \"admin\" page made so I can move the posts around by order of what I think should have priority or whatever but I am not sure how to do that. I could have an \"orderby\" field but how would I update the records below or above that record so their orderby number changes? Example:

 

article|orderby

 

texta|1

textb|2

textc|3

textd|4

 

If I clicked on the link to move textc up (change orderby number to orderby-1 or 2) how does the textb record know that it should now be orderby+1 or 3? What would happen, is there would be two with the same orderby number which wouldnt get the results I want.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.