ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

How to export certain tables from my database ? #227

Closed Kasaner closed 1 year ago

Kasaner commented 3 years ago

Hello, I use this tool since recently and would like to know how I can export only certain tables with certain conditions. An example would be tab "a" from the database "Test" in the period from 2020 to 2021. Thanks for your help

ifsnop commented 3 years ago

There is an include_tables option that allows you to define the name of the tables to dump. Regarding the period, if your table has a date field, you could use the where option, to filter by date.

Hello, I use this tool since recently and would like to know how I can export only certain tables with certain conditions. An example would be tab "a" from the database "Test" in the period from 2020 to 2021. Thanks for your help

Kasaner commented 3 years ago

Thanks for your quick reply. I would first like to briefly note that under latest version under Mysqldump.php under $dumpSettingsDefault 'if-not-exists' was not present in the array. I would need to add this Manuel based on the documentation. So at least in my case.Furthermore I would have a question about export dumpfile. Does this tool provide a way how to export dumpfile again ?

ifsnop commented 1 year ago

No option was removed regarding exporting dumpfile.