hi want to run a query like this:
UPDATE `stories` SET `position`=(select @i:=@i+1)
WHERE `topic` IN
(SELECT `topic` FROM `stories` WHERE `newstype`='2' GROUP BY `topic`)
but target and destination are the same table and mysql doesn't allow me running it. how can i implement it ?