Home > Enterprise >  Best way to store large forms fields in a database table
Best way to store large forms fields in a database table

Time:01-13

im recently working with a medical form that has a huge amount of fields. input, textarea, checkbox, select. etc. The problem is that i consider not efficiently to store every single one in table with an specific column for each one. what alternatives could you suggest me?

CodePudding user response:

like vidal said you can use json or save as array but better way is you make a 1 table for main vars like :

ID=01 Name=Medical1

then make a meta table like :

meta_ID=01 med_ID=01 meta_Name=price meta_value=1000

then make a meta relation table like :

rel_ID=01 med_ID=01 meta_ID=01

then you can easily store or access your values.

  •  Tags:  
  • Related