Decoded from a JSON object I would like to insert a associative array to MySQL via PHP.
I found several examples already like https://www.daniweb.com/web-development/php/threads/381669/json-to-mysql-with-php that handle one-time imports like that - also with unknown keys.
But in my case I need to do inserts (from this associative array) again and again to the same table (without droping and recreating this table first) and there may appear new keys in the array anytime which also need to be reflected as new columns (all defined as "varchar(255)") in the MySQL table.
So basically before doing the insert the existent columns need to be checked and supplemented with the new columns if needed.
I searched a while now, but didn't find anyone who did the same before and just can't believe that I'm the first one who needs this. :-)
Does anyone know an example regarding that coincidentally?
Thanks in advance!