move a record from
$stmt = $db->prepare(
"insert into archive (date, art, img, vid, title, subtitle, story, tags, status, user, pos, titlex, inde)
select date, art, img, vid, title, subtitle, story, tags, status, user, pos, titlex, inde from posts
where id = :aid"
move * except id...
There is no option like
move.. you'd need to insert it into one table and then delete it from the other.
However, you may want to reconsider your table design. If you want to archive something, rather than having two separate tables that contain the same type of data, you should add a flag to your
posts table to indicate whether or not an entry is archived or not. Something like this:
ALTER TABLE posts ADD archived BOOLEAN DEFAULT 0;
When a post is normally added and it's not archived, the
archived column is set to 0. When you want to archive something, you just run an
UPDATE statement setting it to 1 for that record.