If you enter the command...
mysqldump --help
you'll find a long listing of qualifiers that you can use with this, one of which is -w (or --where=) which allows you to specify what you want dumped.
HTH, Ron James wrote:
Hello,
I'm trying to get my brain around this problem. I have a database that stores news articles. This database grows and grows, and I need a way to archive older articles, preferably in a "dump" format similar to that produced mysqldump. Is there a way to do a mysqldump based on a query, or is there some other intelligent method of doing this?
I have thought of a script that would create a temporary table, delete from the main table, then dump that temporary table to a file, then drop the temporary table. Is there a better way?
As an aside, the files created by mysqldump have "drop table"s at the top. Is there a way to turn that off, so that if I want to restore last week's news, I don't accidentally delete this week's.
Thanks!
J.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]