本文整理汇总了PHP中Paginator::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginator::execute方法的具体用法?PHP Paginator::execute怎么用?PHP Paginator::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paginator
的用法示例。
在下文中一共展示了Paginator::execute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pagination
function pagination($url = null)
{
$sql = "SELECT id, first_name, last_name, role, email, active, gender, profile_image,fb_id, created_on FROM user ORDER BY created_on DESC";
$table_page = PATH_ADMIN_VIEWS . "user/paginator/row.php";
$paginator = new \Paginator();
$paginator->execute($sql, $table_page, $url);
}
示例2: pagination
function pagination($url = null)
{
$sql = "SELECT p.id AS id, p.title AS title, c.type AS type , c.name AS category_name, NULL AS comments, \n p.posted_at AS posted_at, p.publish AS publish, u.first_name AS posted_by,\n img.thumb_small as thumb_small, img.original as original \n FROM post p \n LEFT JOIN post_category c ON p.post_category_id = c.id\n LEFT JOIN user u ON p.user_id = u.id\n LEFT JOIN image img ON img.id = p.banner_image";
if (!\SKS\LIB\Session::isSuperAdmin()) {
$sql .= " WHERE u.id = " . \SKS\LIB\Session::getLoggedInUser()->getId();
}
$table_page = PATH_ADMIN_VIEWS . "publish/paginator/row.php";
$paginator = new \Paginator();
$paginator->execute($sql, $table_page, $url);
}
示例3: pagination
function pagination($url = null)
{
$sql = "SELECT i.id AS id, `name`, size, `from`,`date`, original, thumb_small, thumb_medium, thumb_big, u.id AS user_id, u.first_name AS uploaded_by, i.active as active " . " FROM image i LEFT JOIN user u ON u.id = i.user_id ";
if (\SKS\LIB\Session::isAuthor()) {
$sql .= " WHERE u.id = " . \SKS\LIB\Session::getLoggedInUser()->getId();
}
$sql .= " ORDER BY date DESC ";
$table_page = PATH_ADMIN_VIEWS . "gallery/paginator/row.php";
$paginator = new \Paginator();
$paginator->execute($sql, $table_page, $url);
}