{eyou:assign name="keywords" value="$eyou.field.keywords"}
{eyou:sql sql="Select count(*) as AllNum from __PREFIX__archives where title like '%$keywords%'" cachetime='-1'}
{$field.AllNum}
{/eyou:sql}
首先自定义变量 assign 自定义变量名(name)=keyword
value值为搜索页面关键词标签
利用sql 查询 ey_archives表中的title字段中带 ”关键词“(自定义变量名),返回查询数量为allNum字段。
返回数量字段。