本文整理匯總了PHP中ListView::SetSql方法的典型用法代碼示例。如果您正苦於以下問題:PHP ListView::SetSql方法的具體用法?PHP ListView::SetSql怎麽用?PHP ListView::SetSql使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ListView
的用法示例。
在下文中一共展示了ListView::SetSql方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: on
$where .= " and find_in_set({$dest_id},a.kindlist)";
$wherecount .= " and find_in_set({$dest_id},a.kindlist)";
$sql = "select a.* from sline_model_archive a left join sline_kindorderlist b on(a.id=b.aid and b.typeid={$typeid} and b.classid={$dest_id} ) {$where} order by b.displayorder asc, a.modtime desc,a.addtime desc ";
} else {
$sql = "select a.* from sline_model_archive a left join sline_allorderlist b on(a.id=b.aid and b.typeid={$typeid} ) {$where} order by b.displayorder asc, a.modtime desc,a.addtime desc ";
}
$destinfo = TongYong::getDestSeoInfo($module_dest_table, $dest_id);
//目的地優化信息;
$seoinfo = TongYong::getSeoInfo($destinfo, $attrid, $typeid);
//組合搜索標題
//下級目的地
$destlist = Helper_Archive::getChildDest($dest_id, $typeid);
$pv = new ListView($typeid);
$pv->pagesize = 16;
//分頁條數.
$pv->SetSql($sql);
//seo變量賦值
foreach ($destinfo as $k => $v) {
$pv->Fields[$k] = $v;
}
foreach ($seoinfo as $k => $v) {
$pv->Fields[$k] = $v;
}
$pv->Fields['typeid'] = $typeid;
$pv->Fields['modulename'] = $module_name;
$pv->Fields['modulepinyin'] = $module_pinyin;
$pv->SetParameter('destid', $dest_id);
$pv->SetParameter('attrid', $attrid);
$templet = Helper_Archive::getUseTemplet('line_list');
//獲取使用模板
$templet = SLINETEMPLATE . "/" . $cfg_df_style . "/tongyong/tongyong_index.htm";