Check Box Data in MySQL
Using DW 5.5
Imported an MS Access DB table into MySQL table. Access table had Y/N (checkbox) fields; import to MySQL resulted in those fields labeled as TinyInt(1). All of these fields contain either a 0 or 1.
Created (Edit) form with controls to display each of the fields however when a table record is displayed none of those controls show a checkmark (other fields in the records display properly). I've checked many records just to ensure I'm picking at least one with both values across the number of fields in the record.
Is 'TinyInt(1)' the proper type field in the table to hold a checkbox value?
And if not, to what type should the field be changed?
If a change of field type for these fields is necessary, will I lose the current contents? (too many to chance a loss - and yes, I could back up the table just in case)
My query is SELECT * from ..... (so I know I should be acquiring all the fields in the records)
and the display code is (checkboxes do appear but with nothing in them)
<td><input name="M_695" type="checkbox" id="M_695" value="<?php echo $row_getMembers['M_695']; ?>" /></td>
<td><input name="M_696" type="checkbox" id="M_696" value="<?php echo $row_getMembers['M_696']; ?>" /></td>
<td><input name="M_1_112" type="checkbox" id="M_1_112" value="<?php echo $row_getMembers['M_1_112']; ?>" /></td>
<td><input name="M_2_112" type="checkbox" id="M_2_112" value="<?php echo $row_getMembers['M_2_112']; ?>" /></td>
<td><input name="M_3_112" type="checkbox" id="M_3_112" value="<?php echo $row_getMembers['M_3_112']; ?>" /></td>
<td><input name="M_4_112" type="checkbox" id="M_4_112" value="<?php echo $row_getMembers['M_4_112']; ?>" /></td>
<td><input name="M_5_112" type="checkbox" id="M_5_112" value="<?php echo $row_getMembers['M_5_112']; ?>" /></td>
<td><input name="M_6_112" type="checkbox" id="M_6_112" value="<?php echo $row_getMembers['M_6_112']; ?>" /></td>
<td><input name="M_7_112" type="checkbox" id="M_7_112" value="<?php echo $row_getMembers['M_7_112']; ?>" /></td>
Thanks in advance,
Tom
