The number of input entries on the form page determines how to design the database table

the number of input entries on the form page determines how to design the database table

if the new form an and form b or other forms do not unify the fields when submitting data, store them in the database.

outline of the design idea
what should it look like? is it a field separated by a comma, such as 610-1711-9 1016-3, or some other way of storing it?

clipboard.png


store the best


mysql5.7 by json or serialization to support json storage type your situation is more suitable for json
if you can't search by taking out all the data, you can only search by taking out all the data.


it is better to store it in json format, which is more flexible.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3580e-2b7e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3580e-2b7e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?