php - copying mysql rows within single table -
i have mysql database , looking update rows new values, leave originals intact.
for example: within site_files table, there 'site_id' column. have bunch of rows site_id' = 981 want change site_id' = 2016 (and leave original rows in 981.
i hope makes sense. know simple matter use update statement, want leave rows read 981 well.
thanks in advance ideas.
insert site_files (site_id, cola, colb, ...) select '2016', cola, colb, ... site_files site_id = '981' this want, insert, not update
Comments
Post a Comment