Blogger Information
Blog 6
fans 0
comment 0
visits 7099
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
同一模型执行多次更新
kyle
Original
850 people have browsed it

通过model实例化query对象,是一个单列。进行多次更新时,后面的会覆盖前面的数据,所以显示是更新最后一条数据。

解决方法 : 使用静态方法调用update方法进行更新操作

详情见文档:模型章的更新篇(务必仔细阅读)

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!