2011-02-28 73 views
0

我有一个表格的内容是这样的:的MySQL在phpMyAdmin

<tr> 
     <td>c.&nbsp;What is the poverty level of the clients that your institution aims to reach? (Check all that apply):</td> 
     <td><input type="checkbox" name="sfsd" value="fsdsdf" />Very poor clients<br /> 
      <input type="checkbox" name="sfsd" value="fsdsdf" />Poor clients<br /> 
      <input type="checkbox" name="sfsd" value="fsdsdf" />Low income clients<br /> 
      <input type="checkbox" name="sfsd" value="fsdsdf" />Not a specific focus/all population 
     </td> 
     <td><input type="text" name="mfi_name" class="text required" id="mfi_name" maxlength="30"/></td> 
</tr> 

现在我必须做出一个表中插入这个问题的答案我怎么能做到这一点在phpMyAdmin?

回答

1

您可能不需要整个表来保存这个问题的结果。如果你要创建它,它会喜欢这样......

form_id | answer 
---------------  

您可以将结果存储在VARCHAR或文本字段,或者一个字段存储它的同一个整数值,并有一个表,以建立一个文本值(稍后更容易处理)。

你可能想要的是一个存储所有答案结果的表格。

form_id | repsondent_name | response_1 | response_2 

在phpMyAdmin,创建一个数据库,如果你不已经有一个,然后单击数据库,并在创建新表的字段填写创建新表。添加对应于所有表单域的列。您可能需要阅读关于字段数据类型的一些信息。

http://www.tizag.com/sqlTutorial/sqldatatypes.php