Jump to content

Recommended Posts

Hello all

 

I need a little help with the following guestbook style application:

 

http://www.mickleovercommunitycentre.co.uk/TESTING/guestbooknodate/

 

Is there any code i could use to move separate enteries up or down in the guestbook?

 

login on the page is admin.

 

Any help would be great as I cannot write code!

 

Thanks

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/82935-moving-enteries-updown-in-a-guestbook/
Share on other sites

It's best to do -1 for up and +1 for down, so you can sort ASC and when u add a new entry, just give it the order-of-the-last-entry+1

You would also have to change the order of the entry above the one you move up to -1.

And +1 with the one under down.

 

I'll explain:

List:

Entry 1 [uP][DOWN] (order=1)

Entry 2 [uP][DOWN] (order=2)

Entry 3 [uP][DOWN] (order=3)

 

If you click UP for entry 2, it's order becomes 1, but Entry 1 also has order 1, so you'll have to do Entry 1+1.

Visa versa for DOWN.

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.