I hope this is not a dumb question but I really can’t find anything on the net as well as anything in the export settings in phpmyadmin.
My question: Is it possible to export data in phpmyadmin based on matching data to column names. For instance if you export a database or table sql statements are written like
INSERT INTO table VALUES ('1','2','3')
What I want to know if it is possible to export the data so the insert statements read
INSERT INTO table (number1,number2,number3) VALUES ('1','2','3')
The idea is that as I am writing a database I want to be able to export at certain times. But since I am constantly adding new fields in the tables I want to be able to import an old export and still be able to match the columns to the data. That way existing fields contain the data and new ones are just left empty.
Is this possible in just php?
Yes, it it possible. You should use the INSERT format that is similar to update:
Phpmyadmin knows how to do this, just search for “Update style inserts”