联系官方销售客服
1835022288
028-61286886
只为自己记录学习,分享给新手,老手略过~~(有更快捷的方法还请指教)
统计调用复选框数据
模板中调用代码:
<li class="nav-item"><a class="nav-link {if !$params.suoshuzu} active{/if}" href="{dr_search_url($params, 'suoshuzu', NULL, 'news')}"><i class="ion ion-ios-email-outline"></i> 不限 <span class="label label-info pull-right"><?php $query=urlencode("SELECT * FROM dr_1_news");?>{count action=sql sql='$query'}</span></a></li> {php $field = dr_field_options(134);} {loop $field $value $name} <li class="nav-item"><a class="nav-link {if $value==$params.suoshuzu} active{/if}" href="{dr_search_url($params, 'suoshuzu', $value, 'news')}"><i class="ion ion-ios-email-outline"></i> {$name} <span class="label label-info pull-right"><?php $query=urlencode("SELECT * FROM dr_1_news WHERE suoshuzu LIKE '%$value%'");?>{count action=sql sql='$query'}</span></a></li> {/loop}
统计代码:
<?php $query=urlencode("SELECT * FROM dr_1_news");?>{count action=sql sql='$query'}
<?php $query=urlencode("SELECT * FROM dr_1_news WHERE suoshuzu LIKE '%$value%'");?>{count action=sql sql='$query'}