tp连接查询时同一张表左外联两次的问题

浏览:2479 发布日期:2013/09/04 分类:求助交流 关键字: 连接查询 时同一张表 左外联两次的问题
代码段:
$good = M("goods");
import("ORG.Util.Page");
$count = $good->count();
$Page = new Page($count,20);
$show = $Page->show();

$rs = $good->join("think_category as tc ON think_goods.cgFid=tc.cgId")->join("think_category as tc1 ON think_goods.cgSid=tc1.cgId") ->limit($Page->firstRow.','.$Page->listRows)->select();
$this->assign("rs",$rs);
$this->assign("show",$show);
$this->display();
查询出的结果集只是和category左外连接一次的,这是为什么?
最佳答案
评论( 相关
后面还有条评论,点击查看>>