Home > Backend Development > PHP Tutorial > yii2 关联表更新多个字段

yii2 关联表更新多个字段

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:10:49
Original
1804 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:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template