I'm wondering if there is a quick way to do the following:
I have a PHP object with multiple attributes. For example
$person;
$person->height = 165;
$person->name = 'john';
I would like to dump this into an SQLite MySQL DB while creating each column automatically from the attribute names of the PHP object. So for example, if I were to dump the above object into mySQL, it would look something like this:
Table : people
Name(Column, VARCHAR) - "John"
Height(Column, INT) - 165
The reason I am asking this is because the number of attributes is growing constantly, and having to create and manage the table columns manually is a lot of work. I am wondering if there is an automated way of doing this.