小兔网


Deprecated: Required parameter $toggle follows optional parameter $filterGroups in /home/wwwroot/ixiaotu.com/plugins/content/easycontentrestriction/easycontentrestriction.php on line 289

Deprecated: Required parameter $subnum follows optional parameter $n in /home/wwwroot/ixiaotu.com/plugins/content/easycontentrestriction/aop/AopClient.php on line 802

Deprecated: Required parameter $charset follows optional parameter $n in /home/wwwroot/ixiaotu.com/plugins/content/easycontentrestriction/aop/AopClient.php on line 802

Deprecated: Required parameter $length follows optional parameter $start in /home/wwwroot/ixiaotu.com/plugins/content/easycontentrestriction/aop/AopClient.php on line 815

多表查询时,mysql语句为:

select a.*,b.* from 表A名 as a left join 表B名 as b on a.字段名=b.字段名;

当出现两个相同字段名字时,比如相同字段名为name,就可以a.name as aname,b,name as bname;

语句为:

select a.name as aname,b.name as bname from as a left join 表B名 as b on a.字段名=b.字段名;