随记之phpcms二级查询

{pc:content action="lists" catid="$catid" num="25" order="id ASC" page="$page" moreinfo="1"}
        {loop $data $r}
        <dl>
          <dt><a href="" title="{str_cut($r['title'],50)}"><img src="{thumb($r['thumb'],130,177)}" alt="{$r['title']}" width="130" height="177" /></a></dt>
          <dd>
            <h3>姓名:{$r[title]} 职务:{$r[zw]} 职称:{$r[zc]} 所属科室:{$r[ssks]}</h3>

            {pc:get sql="SELECT * FROM v9_ks where title = '$r[ssks]'  ORDER BY id ASC"  num="50"  }
            {loop $data $r}

            <h3>科室url:{$r[url]}</h3>
            {/loop}
            {/pc} 

            <p>{$r[content]}</p>
          </dd>
          <div style="clear:both"></div>
        </dl>
        {/loop}
        <div id="pages" class="text-c">{$pages}</div>
        {/pc}


你可能感兴趣的:(随记之phpcms二级查询)