Is there a way to use 1 table to define the colums of another table
Posted on 2011-09-30
iI would like to create a mysql database table that will contain 3 fields.
I would then like the records of this table to be used to create the fields of another table.
so that if a record contained the following
name = x
description = y
default value z
and another record contains
default value c
then the fields of the otehr table would be x and a.
the 2nd table would update with a new field whenever a new record was added to table 1.
furthermore when a new record is created in table 2, field x would default to z if no other value was specified at record creation.
What is the best way to go abvout this?