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

Allow to select the empty set 'limit 0' #201

Closed dcabrejas closed 4 years ago

dcabrejas commented 4 years ago

Hi,

Mysql allows you to limit by 0, which returns the empty set. This is useful for when you want to dump the table but without records, for example the customers table of a production database. You want to have the table but not the customers since that would be a GDPR violation.

I've noticed that this package doesn't support setting the table limit as 0 and therefore it doesn't support the use case of dumping a table but ignoring all the data inside.

dcabrejas commented 4 years ago

Hi @ifsnop , any chance this can be merged in?

ifsnop commented 4 years ago

Sorry for the delay, didn't have enough time. Done.

dcabrejas commented 4 years ago

Gracias!