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

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

WBOY
Release: 2016-06-13 11:54:51
Original
1039 people have browsed it

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' );

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template