本文整理匯總了PHP中general::get_for_filter方法的典型用法代碼示例。如果您正苦於以下問題:PHP general::get_for_filter方法的具體用法?PHP general::get_for_filter怎麽用?PHP general::get_for_filter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類general
的用法示例。
在下文中一共展示了general::get_for_filter方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: indexAction
/**
* отображаем весь список материалов
*/
function indexAction()
{
if (isset($_POST['status'])) {
$_SESSION['status'] = $_POST['status'];
}
if (isset($_POST['id_parent']) and $_POST['id_parent'] > 0) {
$limit = 1000;
} else {
// get limit
// всего в каталоге
$_total_gallery = dbh::gallery_get_total_count();
$limit = pager::pager_limit($_total_gallery, ADMIN_GALLERY_AT_PAGE);
}
// строим запрос
$_sql = 'SELECT * FROM ' . $this->tablename . ' where id>0 ' . general::get_status_for_filter($this->tablename) . ' ' . general::get_for_filter($this->tablename, 'id_parent') . ' order by sort limit ' . $limit;
// выполняем запрос + при необходимости выводим сам запрос
$result = mysql::query($_sql, 0);
// выбираем фотоальбомы
$_sql = 'SELECT * FROM gallery_grupa where status=1 and id_parent=0 order by pole';
$gallery_grupa = mysql::query($_sql, 0);
return system::show_tpl(array('result' => $result, 'msg' => $this->msg, '_status' => isset($_POST['status']) ? $_POST['status'] : 2, 'gallery_grupa' => $gallery_grupa, 'tpl_folder' => $this->tpl_folder, '_total_gallery' => $_total_gallery), $this->tpl_folder . '/index.php');
}