tp5 关联查询(JOIN)问题 数据库明明能查询到数据,打印却是空的

浏览:13815 发布日期:2017/03/28 分类:ThinkPHP5专区 关键字: tp5关联查询,tp5JOIN查询
控制器代码如下:

$result = $this->dblink('aipu.task_seller')
->alias('a')
->join('aipu_member_binds b','a.uid = b.uid','LEFT')
->where($map)
->order($order)
->find();

echo $this->dblink('aipu.task_seller')->getLastsql();exit;
print_r($result);exit;

生成的sql语句如下:

SELECT
*
FROM
`aipu_task_seller` `a`
LEFT JOIN `aipu_member_binds` `b` ON `a`.`uid` = `b`.`uid`
WHERE
`b`.`account` = '壹道壹'
ORDER BY
`sid` DESC
LIMIT 1

查询到的数据如下:



数据库明明可以查询到数据,为什么打印却是空的?

附件 QQ图片20170328114430.png ( 80.63 KB 下载:26 次 )

最佳答案
评论( 相关
后面还有条评论,点击查看>>