mysqldump-php icon indicating copy to clipboard operation
mysqldump-php copied to clipboard

Table selection

Open MikeBrice opened this issue 3 years ago • 2 comments

I have recently found this project and am finding it a huge help. I have two collections of tables in the same schema each with a seperate prefix value in the table names. I would like to dump only one of the collections of tables, that is to say all tables with names starying with 'abc_'. I have seen that I can provuide an array of specific table names but for me it would be simper if I coule provide a table name prefix value. Is this possible ? If so how can I acgieve this ?

Many thanks for any guidance

MikeBrice avatar Apr 14 '21 08:04 MikeBrice

Select all tables with the "abc_" prefix, run a query and pass its result to setTableWheres()

SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name like 'abc_%'

smalos avatar Apr 17 '21 06:04 smalos

Thanks for using it. The exclude table list supports exactly what you want, using regular expressions For the include table, support for r hasn't been added yet. If you find this project useful and would like to contribute, please do so.

Meanwhile, the other answer will do the job for you, but you need to manage the connection by yourself.

Regards

I have recently found this project and am finding it a huge help.

I have two collections of tables in the same schema each with a seperate prefix value in the table names. I would like to dump only one of the collections of tables, that is to say all tables with names starying with 'abc_'. I have seen that I can provuide an array of specific table names but for me it would be simper if I coule provide a table name prefix value. Is this possible ? If so how can I acgieve this ?

Many thanks for any guidance

ifsnop avatar Apr 17 '21 09:04 ifsnop