In the mysql table create a unique index and use "INSERT IGNORE INTO" .. the rest can be achieved with array_unqiue() on the php end
Prototype can create a unique id on the page if i recall correctly so that can be used as a sub id for the elements with a parent id (the element container if you like) can make sure things end up in the right place on page load..... I still believe this has been very over complicated but i missed half the threads so perhaps i am still missing somehting .. but from what you just replied it is not complicated to do. Alex ----- Original Message ----- From: "Walter Lee Davis" <[email protected]> To: <[email protected]> Sent: Thursday, May 28, 2009 5:01 PM Subject: [Proto-Scripty] Re: MySQL - order ID > > Yes, that very limited case is simple. What WLQ is trying to do is > have two lists of things, be able to drag an unlimited number of > copies from the first list into the second list, and have the dropped > elements keep their place in the second list while the first list > remains exactly the same. > > Dragging an element out of the first list will not reduce the number > of "template" elements in that list, each time you drag one out, it > goes back for the next time. A copy (with a new unique ID) of that > template will be inserted into the second list, where it will join the > sortable, remember where it was dropped, and so forth. > > It's quite difficult to pull off when you cover all of those bases. I > do know those three lines you refer to -- but they don't cover > everything that the OP wants to do. > > Walter > > On May 28, 2009, at 11:24 AM, Alex McAuley wrote: > >> If all you are trying to do is update a table on a droppable to >> remeber the >> order then its so simple you can do it in about 3 lines ..... > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
