当前位置: 首页>>代码示例>>PHP>>正文


PHP limit函数代码示例

本文整理汇总了PHP中limit函数的典型用法代码示例。如果您正苦于以下问题:PHP limit函数的具体用法?PHP limit怎么用?PHP limit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了limit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tag

 function tag($tag)
 {
     $data['tag'] = $tag;
     $data['knowledges'] = new Knowledge();
     $data['knowledges']->where("tag like '%{$tag}%'")->get_page(limit());
     $this->template->build('knowledge_tag', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:7,代码来源:knowledges.php

示例2: tag

 function tag($tag)
 {
     $data['tag'] = $tag;
     $data['informations'] = new Information();
     lang_filter($data['informations']->where("tag like '%{$tag}%'"))->get_page(limit());
     $this->template->build('information_tag', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:7,代码来源:informations.php

示例3: index

 function index()
 {
     $webboard_relate_dels = new Webboard_relate_del();
     $data['webboard_relate_dels'] = $webboard_relate_dels->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/webboard_relate_del_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:7,代码来源:webboard_relate_dels.php

示例4: flat_load

/**
 * Load entity
 *
 * @param array $entity
 * @param array $crit
 * @param array $opts
 *
 * @return array
 */
function flat_load(array $entity, array $crit = [], array $opts = []) : array
{
    $stmt = db()->prepare(select($entity['attr']) . from($entity['tab']) . where($crit, $entity['attr'], $opts) . order($opts['order'] ?? [], $entity['attr']) . limit($opts['limit'] ?? 0, $opts['offset'] ?? 0));
    $stmt->execute();
    if (!empty($opts['one'])) {
        return $stmt->fetch() ?: [];
    }
    return $stmt->fetchAll();
}
开发者ID:akilli,项目名称:qnd,代码行数:18,代码来源:flat.php

示例5: index

 function index()
 {
     $data['type'] = array('7' => 'ico_notify_03.png', '8' => 'ico_notify_06.png', '9' => 'ico_notify_08.png', '193' => 'ico_notify_10.png');
     $data['notices'] = new Notice();
     @$_GET['titlesearch'] ? $data['notices']->like('title', $_GET['titlesearch']) : '';
     @$_GET['type'] ? $data['notices']->where('category_id', $_GET['type']) : '';
     lang_filter($data['notices'])->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'")->order_by('start_date', 'desc')->get_page(limit());
     $this->template->build('notice_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:9,代码来源:notices.php

示例6: index

 function index()
 {
     $data['english_zones'] = new English_zone();
     if (@$_GET['search']) {
         $data['informations']->where("title like '%" . $_GET['search'] . "%'");
     }
     auth_filter($data['english_zones'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/english_zone_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:10,代码来源:english_zones.php

示例7: index

 function index()
 {
     $menus = new Menu();
     if (@$_GET['status']) {
         $menus->where('status', $_GET['status']);
     }
     $data['menus'] = $menus->order_by('orderlist', 'asc')->get_page(limit());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/menu_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:10,代码来源:menus.php

示例8: index

 function index()
 {
     $data['polls'] = new poll();
     if (isset($_POST['search'])) {
         $data['polls']->where('title like \'%' . $_POST['search'] . '%\'');
     }
     $data['polls']->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_checkbox());
     $this->template->build('admin/poll_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:10,代码来源:polls.php

示例9: index

 function index()
 {
     $webboard_quizs = new Webboard_quiz();
     if (@$_POST['category_id']) {
         $webboard_quizs->where('category_id', $_POST['category_id']);
     }
     $data['webboard_quizs'] = $webboard_quizs->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/webboard_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:10,代码来源:webboard_quizs.php

示例10: index

 function index($id = FALSE)
 {
     $data['categories'] = new Category($id);
     $galleries = new Gallery();
     if (@$_POST['category_id']) {
         $id = $_POST['category_id'];
     }
     $data['galleries'] = $galleries->where('category_id', $id)->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/gallery_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:11,代码来源:galleries.php

示例11: index

 function index($category_id = FALSE)
 {
     $articles = new Article();
     if ($category_id) {
         $category = new Category($category_id);
         $articles->where("category_id in (select id from categories where lft >= " . $category->lft . " and rgt <= " . $category->rgt . " and module = '" . $category->module . "')");
     }
     $data['articles'] = $articles->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/article_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:11,代码来源:articles.php

示例12: index

 function index()
 {
     $data['hilights'] = new hilight();
     if (@$_GET['status']) {
         $data['hilights']->where('status', $_GET['status']);
     }
     auth_filter($data['hilights'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/hilight_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:11,代码来源:hilights.php

示例13: select

 /** Select data from table
  * @param string
  * @param array result of $adminer->selectColumnsProcess()[0]
  * @param array result of $adminer->selectSearchProcess()
  * @param array result of $adminer->selectColumnsProcess()[1]
  * @param array result of $adminer->selectOrderProcess()
  * @param int result of $adminer->selectLimitProcess()
  * @param int index of page starting at zero
  * @param bool whether to print the query
  * @return Min_Result
  */
 function select($table, $select, $where, $group, $order, $limit, $page, $print = false)
 {
     global $adminer, $jush;
     $is_group = count($group) < count($select);
     $query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
     if (!$query) {
         $query = "SELECT" . limit(($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table), ($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""), $limit != "" ? +$limit : null, $page ? $limit * $page : 0, "\n");
     }
     if ($print) {
         echo $adminer->selectQuery($query);
     }
     return $this->_conn->query($query);
 }
开发者ID:amit0773,项目名称:manaslake,代码行数:24,代码来源:driver.inc.php

示例14: index

 function index()
 {
     $data['weblinks'] = new Weblink();
     if (@$_GET['search']) {
         $data['weblinks']->where("title like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['category_id']) {
         $data['weblinks']->where("category_id = " . $_GET['category_id']);
     }
     $data['weblinks']->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/weblinks_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:13,代码来源:weblinks.php

示例15: index

 function index()
 {
     $data['faqs'] = new Faq();
     if (@$_GET['search']) {
         $data['faqs']->where("question like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['category_id']) {
         $data['faqs']->where("category_id = " . $_GET['category_id']);
     }
     $data['faqs']->order_by('orderlist', 'asc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/faqs_index', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:14,代码来源:faqs.php


注:本文中的limit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。