## **query标签 万能数据表查询标签**
#
```
{query table="link" field="title,url" num="12" sqlstr="status=1"}
<a href='{$query.url}' target='_blank' >{$query.title}</a>
{/query}
```
#
## **page标签 万能分页列表标签**
#
```
<div>
<ul>
{page table="book" num="2" sqlstr="status=1" order="book_id desc"}
<li>用户名:{$page.username} - 电话:{$page.mobile}</li>
<li>留言内容:{$page.content}</li>
{/page}
</ul>
<div>
<div>{$showpage}</div>
```
#
## **relate 原生sql查询标签**
```
{relate sqlstr="select a.*,b.* from cd_content as a left join cd_ext_case as b on a.content_id = b.content_id"}
<li>{$relate.title} {$relate.case_des}</li>
{/relate}
```
#