<code>$use=D('classone'); $db=$use->alias('a')->select();</code>
If in SQL, use SELECT b.id , b.name ,t.id FROM book as b , type as t ;
It makes sense to have an alias like this, here is ->alias('a') What is the purpose of giving an alias?
<code>$use=D('classone'); $db=$use->alias('a')->select();</code>
If in SQL, use SELECT b.id , b.name ,t.id FROM book as b , type as t ;
It makes sense to have an alias like this, here is ->alias('a') What is the purpose of giving an alias?
That’s what it means. .
http://www.kancloud.cn/manual/thinkphp/1737
The alias is used to represent a certain field in a certain table more concisely when JOIN tables are used. It can be used but not used