且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何禁用和取消选中数据库字段中的复选框值.

更新时间:2023-02-08 17:16:15

您应规范化您的数据库-座位字段未规范化,只能容纳一个项目.

You should normalize your database - the Seats field is not normalized and should only hold one item.

在字段中使用逗号分隔的值是不好的做法.如果其中只有一个值,如下所示:

Having comma delimited values in a field is bad practice. If you had a single value in it like the following:

Name          Seats           Date

Sumit         1               11-Dec-2010
Sumit         3               11-Dec-2010
Sanjeev       2               12-Dec-2010
Sanjeev       4               12-Dec-2010
Manish        1               11-Dec-2010
Manish        3               11-Dec-2010
Manish        4               11-Dec-2010

删除记录将与取消选中相关,添加一条记录将与选中复选框相关.

Removing a record would correlate to unchecking and adding one would correlate to checking a checkbox.