[thelist] Message Archive - MySQL
Ed McCarroll
Ed at ComSimplicity.com
Wed Jul 30 10:53:23 CDT 2003
> A better way of doing this may be to have a 'flag' in the
> message table called 'deleted', which can be set to true or
Of course your original approach will tend to keep the Messages
table short and quickly search-able.
I'm not sure anyone answered your original question; here's my stab
at it. To use your propose approach, before you do your DELETE,
the copy can be accomplished with something like:
INSERT INTO message_archive
SELECT * FROM messages
WHERE touid = '12345' AND (TO_DAYS(Now()) - TO_DAYS(date)) > 30;
(MS Access syntax, YMMV.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ed McCarroll MailTo:Ed at ComSimplicity.com
ComSimplicity (310) 838-4330
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the thelist
mailing list