Blogger Information
Blog 175
fans 1
comment 0
visits 384634
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
thinkphp3.2数据库操作
dxp2tq的博客
Original
1402 people have browsed it

版本:3.2.3
内容:数据库操作

  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