Frame thinkphp
Version: 3.2.3
Content: Database Operations
1. Multiple tables to find a piece of data
M (' a table ')->join ("B table on B. id=a table. Id")->where (' condition ')->find ();
2. Find a piece of data
M (' a table ')->where (' condition ')->find ();
3. Multi-table query all data
M (' a table ')->join ("B table on B. id=a table. Id")->where (' condition ')->select ();
4. Query all data
M (' a table ')->where (' condition ')->select ();
5. Add a piece of data
M (' a table ')->add ($data);
6. Delete a piece of data
M (' a table ')->where (' condition ')->delete ($data);
7. Modification of a piece of data
M (' a table ')->where (' id=5 ')->save ();
The above is a small series for everyone to bring the thinkphp3.2.3 version of the database to check the implementation of the full code of the content, hope to help everyone, a lot of support cloud Habitat Community ~