Home  >  Article  >  Backend Development  >  2个表怎么关联查询(thinkphp)

2个表怎么关联查询(thinkphp)

WBOY
WBOYOriginal
2016-06-13 11:54:51997browse

2个表如何关联查询(thinkphp)
2张表
一:id uid name;
二;uid name;
知道这个是关联,但是不会写。就是就是将第一个表中的uid显示成第二个表中的name,求解
------解决方案--------------------
$a = new Model('a');
$list = $a->join('left join b on a.uid = b.uid' );

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn