I would like to know which is the better way to store the result of a multiple checkboxes form into a mysql table.
I can see two solutions but perhaps there is other
-One field by checkbox
-One field for all checkboxes with serialize data
thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just speaking for myself: I would find it far, far easier to query stored checkbox values later if I took the trouble to store them one per column in the first place. But of course YMMV.
Storing the values one per column also makes those values normalized, which is (or should be) one of my primary goals in designing the table.