yii2 关联表更新多个字段

WBOY
Release: 2016-06-06 20:10:49
Original
1725 people have browsed it

有两张表account和user,其中account 表中有字段mobile,bind ,user表中也有mobile,和bind字段,account类和user类使用hasMany通过uid关联,在更新account表mobile.bind的时候,自动更新user表关联,请问,自动更新时能否更新user表中的mobile和bind

yii2 关联表更新多个字段

回复内容:

有两张表account和user,其中account 表中有字段mobile,bind ,user表中也有mobile,和bind字段,account类和user类使用hasMany通过uid关联,在更新account表mobile.bind的时候,自动更新user表关联,请问,自动更新时能否更新user表中的mobile和bind

yii2 关联表更新多个字段

俩字段用外键关联即可

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!