The table method of the Thinkphp curd method also belongs to one of the coherent operation methods of model class, and the method 
A data table that is used primarily for specifying operations。 
 
The specific usage is as follows:
 
In general, the system can automatically recognize the current corresponding data table when manipulating the model, so the table method is usually used to:
 
1. Data sheet for switching operations;
2. Operate on multiple tables;
 
For example:
 
$Model->table (' Think_user ')->where (' status>1 ')->select ();
 
You can also specify the database in the table method, for example:
 
$Model->table (' Db_name.think_user ')->where (' status>1 ')->select ();
 
It is important to note that the table method does not alter the connection to the database, so you want to ensure that the current connected user has permission to manipulate the database and data tables. 
 
After switching the data table, the system automatically retrieves the field cache information for the Switched data table.
 
If you need to operate on multiple tables, you can use this:
 
$Model->field (' User.name,role.title ')->table (' Think_user user,think_role role ')->limit ()->select () ;
 
In order to avoid conflicts with MySQL keywords, it is recommended to use array-like definitions, for example:
 
$Model->field (' User.name,role.title ')->table (Array (' think_user ' = ' user ', ' think_role ' = ' role ')- >limit (->select) ();