I have this query to re-order items in a MySQL Table
Update Content.items SET list_order=list_order+1 Where list_order=
(Select list_order-1 From Content.items where id='41e31kufg');
But i get this error:
Error Code: 1093. You can't specify target table 'items' for update in FROM clause
Heres an example of a dataset before re-ordering
rowid list_order
41e31kufg 1
62g88nfjs 2
99h84mlkd 3
92r63mkvf 4
After reordering:
rowid list_order
99h84mlkd 1
92r63mkvf 2
41e31kufg 3
62g88nfjs 4
What is the solution for this ?