The problem is that any user who clicks on the arrow fast enough can break the script when it hasn't yet moved the second item.
It works fine, when I use it normally.
Can I somehow put these queries together?
Thank you for your time.
Code: Select all
<?php
mysql_query("UPDATE bookmarks SET position='$position'
WHERE position='$higherposition' AND ename='$ename' AND parent='$parent'") or die(mysql_error());
mysql_query("UPDATE bookmarks SET position='$higherposition'
WHERE ID='$id' AND ename='$ename' AND parent='$parent'") or die(mysql_error());
?>