Re: need a new challenge
| From: | Dominik Werder | Date: | Sat, 15 Mar 2003 10:25:19 +0000 |
| Subject: | Re: need a new challenge | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139791@lists.php.net to get a copy of this message | ||
Hi Chris (and all others),
This seems to me a very common "problem". I managed it too with different approaches including complete on the fly code generation, but I don't think that I have already the perfect solution.
Does anyone have more information on this topic?
bye!
Dominik
Metatable Suppose you've got one db table (meta-table) desribing the content of various other tables, for instance ID tablename fieldname fieldtype [integer|textarea|choicelist|link_to_other_table|....] default_value permissions The easy part: make an interface so people can design their own db table, the description of every field goes into the metatable and the field is added to the datatable it refers to. With templates one can now quickly make show/edit/add/overview pages. I managed that. Now I want to have choice lists that come from new tables. For instance: with this system they made a table person (gender, name, etc), now i want to add a choice list of institutions, where the institutions are in another table (institute name, address, etc). Doing this directly is easier than doing it via this extra table. Let them use a class?