calle08 Posted August 20, 2011 Share Posted August 20, 2011 I want to crate duplicates of the following but cnage the date to 2011-09-10 how can i do that? SELECT firstname, lastname, date, info FROM all WHERE date '2011-08-30' Quote Link to comment https://forums.phpfreaks.com/topic/245285-crate-duplicates/ Share on other sites More sharing options...
The Little Guy Posted August 21, 2011 Share Posted August 21, 2011 You want to do a insert into ... select from. It would look something like this: insert into all (firstname, lastname, '2011-09-10', info) SELECT firstname, lastname, date, info FROM all WHERE date = '2011-08-30' Quote Link to comment https://forums.phpfreaks.com/topic/245285-crate-duplicates/#findComment-1259992 Share on other sites More sharing options...
The Little Guy Posted August 21, 2011 Share Posted August 21, 2011 insert into all (firstname, lastname, '2011-09-10', info) SELECT firstname, lastname, date, info FROM all WHERE date = '2011-08-30' Just realized the above has a tiny error insert into all (firstname, lastname, date, info) SELECT firstname, lastname, '2011-09-10', info FROM all WHERE date = '2011-08-30' Quote Link to comment https://forums.phpfreaks.com/topic/245285-crate-duplicates/#findComment-1260006 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.