tags:

views:

15

answers:

1

In my way.I just want to export the data of a week and used it to update somewhere else.

I am new to MySql. So . Can I do it by the PHP code written by myself or using other software?

Thank you in advanced!!

A: 

If you're using mysqldump, you can use the --where option to limit data ranges:

mysqldump -p -u username DATABASE table --where="datefield >= 'start date' AND datefield <= 'end date')

There's also the OUTFILE option:

SELECT INTO OUTFILE '/name/of/dump/file' ...

otherwise, it's just a matter of building the appropriate query in MySQL, looping over the result set, and dumping the data into a file from which you can extract the data again somewhere else.

Marc B