#The following brings you an implementation code for database addition, deletion, modification and query of thinkphp3.2.3 version. It’s pretty good. I’ll share it with you now and give it as a reference.
Recommended related mysql video tutorials: "mysql tutorial"
Framework thinkphp
##Version: 3.2.3
1. Find a piece of data in multiple tables
M('a表')->join("b表 on b表.id=a表.id")->where('条件')->find();
2. Find a piece of data
M('a表')->where('条件')->find();
3. Query all data in multiple tables##
M('a表')->join("b表 on b表.id=a表.id")->where('条件')->select();
4. Query all data
M('a表')->where('条件')->select();
5.Add a piece of data
M('a表')->add($data);
6. Delete a piece of data
M('a表')->where('条件')->delete($data);
7. Modify a piece of data
M('a表')->where('id=5')->save();
The above is the detailed content of Thinkphp3.2.3 version database addition, deletion, modification and query implementation code. For more information, please follow other related articles on the PHP Chinese website!