updating a table in a Mysql database -
lets have in table named threadloc
id thread 4 1 3 2 2 3 1 4 for table
i want change table value of thread can pick thread , put in on bottom (id 1) , push other threads one.
so pick 2 be
id thread 4 1 3 3 2 4 1 2
update threadloc set id = id + 1 thread <> @currentthread , id < @currentid; update threadloc set id = 1 thread = @currentthread edit: doesn't change higher ids
Comments
Post a Comment