daniloaz / myphp-backup

Simple and fast MySQL backups using PHP
GNU General Public License v3.0
201 stars 115 forks source link

Double quotes and suggestion #9

Closed lenamtl closed 5 years ago

lenamtl commented 5 years ago

Here are some suggestions

If I compare the result from PHPMyAdmin backup and the one from your script.

With your script All value are inside double quote " " PHPMyAdmin only some value are single quote ' ' not all values.

for example all numeric and ID are all inside double quote VALUES ("1","10"); instead of VALUES (1, 10);

Maybe having the choice to use single or double quote and not outputting all values in quote.

Also UNSIGNED appear lower case unsigned

Overall I did a few test and It's working ok the way it is I guess as long as the quote are escaped correctly it will work ok...

Having the choice between MSQLI or PDO (I know it's probably not very complicate to updated and change the queries.)

daniloaz commented 5 years ago

Thank you for your feedback lenamtl! I already removed quotes from numbers, null and boolean values. Hope that helps!

Regarding unsigned, there is no problem with lower case, it comes directly from SHOW CREATE TABLE MySQL command, so it works perfectly.

I can't give support for PDO at this moment, I don't have the time, sorry, but any contribution is welcome!

Thank you!