Home  >  Article  >  Backend Development  >  dedecms二次开发 多类别型选择

dedecms二次开发 多类别型选择

WBOY
WBOYOriginal
2016-06-13 10:34:02727browse

dedecms二次开发 多种类型选择
修改dedecms时,用户要求是添加商品使用场合时,可以有选择多个使用地点。即可以多选使用地。
请问数据库怎么修改?怎么保存多列选择的结果,传值怎么传好?
各位大神照顾下。


------解决方案--------------------
按照数据库范式, 1:n 需要一个单独的表, 一行代表一个选择关系, 一个用户选择多个, 那么对应多行, 至少需要为(用户+选择)建立唯一索引(也可以做为primary key), 根据需要可以增加自增列作为primary key。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn