On Fri, 28 Sep 2007 09:50:42 -0000, Joćo Morais wrote:
>> Why not just use your autoincrement field?
>
> Because positions can be changed later, moved up or down.
Since your application is driving the data change, then your application
has to resolve the problems.
You may wish to look at locking the tables in question for this kind of
thing to be done. It could be handled as a transation as well, but it
would require more analysis of other parts of the system than just this
presentation ordering to determine what things would need to happen to
ensure that only the right changes get made.
See
http://dev.mysql.com/doc/refman/5.0/...-commands.html
for information about both locking and transactions.
> PS: At the example above store engine is myisam but I'm using innodb.
That won't solve your problem all by itself.
--
The plural of datum is not "facts".
A collection of facts is not "knowledge".