Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为“类型”的表,其中包含数据“家庭,个人”我希望在某些页面中仅将个人加载到类型下拉列表中,而在另一个页面中加载两者
我怎样才能做到这一点??
提前致谢
是的。您可以在模型中设置默认值:
db.yourtable.yourfield.requires=IS_IN_SET(('family','individual'))
在您可以做的任何动作中
db.yourtable.yourfield.requires=IS_IN_SET(('family'))