phpcms多张表联合读取数据
2014-04-17 15:03:59   来源:   浏览: 次

导读:{pc:get sql="SELECT l `title`,l `description`,l `url`,l `inputtime`,c catname FROM `v9_life` as l left join `v9_category`
{pc:get sql="SELECT l.`title`,l.`description`,l.`url`,l.`inputtime`,c.catname FROM `v9_life` as l left join `v9_category` as c ON c.catid = l.catid order by l.`inputtime` desc" num="8" return="data"}
{loop $data $r}
  {$r[catname]}
{/loop}
{/pc}