Hey guys,
I have this project on hand, where i need to be able to store a dynamic number of fields in my mysql dbase... i need to add a new column for every field... any ideas on the best way to do this?
Kunal
Printable View
Hey guys,
I have this project on hand, where i need to be able to store a dynamic number of fields in my mysql dbase... i need to add a new column for every field... any ideas on the best way to do this?
Kunal
Hi kunal,
Whenever you create a new field, you are creating a new column.
If this isn't what you mean, could you please give some examples?
-Corbb
You could create a separate table like this:
CREATE TABLE data (
rowid INT UNSIGNED NOT NULL,
type VARCHAR(20),
value VARCHAR(50)
);
where rowid links the row to the other table.
Whenever you create a new field, you are creating a new column.
thats what i wanna do :) but the big problem is, i will need to vary my mysql queries equally...
i dint understand the new table thing.. how is it gonna help my queries??
any more ideas??