[eluser]Eric Barnes[/eluser]
Hi,
I am working on a new script and I want to allow the admins to create extra fields for a table. The trick is I want this data to be pulled out and also be sortable when viewing a list of results.
Currently I came up with the idea to create a secondary table something like "field_data" which by default only includes the unique id and the id of the relationship. Then when an admin creates a new field it adds a new field to this table.
The other idea I had was to create a table like this:
table field_data
fields: id, rel_id, field_id, field_value
But that seems to add a lot of complexity when generating search results and trying to resort data from this table.
Does anyone have any other ideas that I may not be thinking about?