dapcigar Posted October 22, 2014 Share Posted October 22, 2014 I know this code works INSERT INTO archive_table SELECT * FROM original_table WHERE id = 1 But i want to also add the current date whenever i copy the data into a new table. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/291976-copy-files-from-one-table-to-another/ Share on other sites More sharing options...
jazzman1 Posted October 22, 2014 Share Posted October 22, 2014 Have you tried to add now() to the selecting list of the original_table. Something like: INSERT INTO archive_table(col_1, col_2, col_3) SELECT col_1,col_2, now() FROM original_table WHERE id = 1 Link to comment https://forums.phpfreaks.com/topic/291976-copy-files-from-one-table-to-another/#findComment-1494367 Share on other sites More sharing options...
dapcigar Posted October 22, 2014 Author Share Posted October 22, 2014 Yeah, that solved the issue... thanks Link to comment https://forums.phpfreaks.com/topic/291976-copy-files-from-one-table-to-another/#findComment-1494370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.