Reputation: 3
<div>
<input style="margin: 14px 0px 0px 0px;" type="checkbox"
value="<?php echo $row['Code']; ?>" name="Inc_Rc_Human_Factor"
id="Inc_Rc_Human_Factor" onclick="popup(this)" />
<?php echo $row['Description'] ?>
</div>
I need to store multiple check box values in a single column in a MySQL DB. Is it possible to store multiple values in a single column? If yes, please help me. Thanks in advance.
Upvotes: 0
Views: 1387
Reputation: 3034
I am totally agree with @mmgross.
However, if you want to do this intentionally, try this solution:
https://stackoverflow.com/a/27579155/2004910
Upvotes: 0
Reputation: 3092
It is possible, but what you're trying to do violates 1NF (First normal form) or 2NF (Second normal form), depending on the implementation.
While adhering to the NFs is not an absolute law, violating them without good reason and much though is usually a red flag, that you'll run into trouble at some point later.
I'd suggest to rethink the structure of your database.
Upvotes: 1