Blogger Information
Blog 20
fans 0
comment 0
visits 33332
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
thinkphp3.2.3版本的数据库增删改查实例
陈文鹏的博客
Original
2403 people have browsed it

1.多表查找一条数据

M('a表')->join("b表 on b表.id=a表.id")->where('条件')->find();

2.查找一条数据

M('a表')->where('条件')->find();

3.多表查询所有数据

M('a表')->join("b表 on b表.id=a表.id")->where('条件')->select();

4.查询所有数据

M('a表')->where('条件')->select();

5.增加一条数据

M('a表')->add($data);

6.删除一条数据

M('a表')->where('条件')->delete($data);

7.修改一条数据

M('a表')->where('id=5')->save();




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