Kiril_cvetkov;10917768 wrote:does while is good idea? the script will be executing fast or?
you can use this UPDATE in a single sql query:
update table_name set `past`=`new` , `new`='12345' WHERE 1
this will set the past field's value to the new field's value, and set 12345 to the new field on your whole table. if you need this, then execute this sql query.
lets have a make a backup from your database before run such a harmful UPDATE code.