• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP limit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: index

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


示例17: index

 function index($category_id = FALSE)
 {
     $this->template->set_layout('layout_blank');
     if ($category_id) {
         $data['categories'] = new Category($category_id);
         @$_GET['textsearch'] ? $data['categories']->academic->like('title', $_GET['textsearch']) : '';
         $data['categories']->academic->where("status = 'approve'")->order_by('id', 'desc')->get_page(limit());
         $this->template->build('academic_category_view', $data);
     } else {
         $data['categories'] = new Category();
         $data['categories']->where("module = 'academics' and parents <> 0")->get_page();
         $this->template->build('academic_index', $data);
     }
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:14,代码来源:academics.php


示例18: view

 function view($id, $group = FALSE)
 {
     $this->template->set_layout('layout_blank');
     $data['catagory_id'] = $id;
     $data['galleries'] = new Gallery();
     @$_POST['textsearch'] ? $data['galleries']->like('title', $_POST['textsearch']) : '';
     @$_POST['groups'] ? $data['galleries']->where_related_category('group_id', $_POST['groups']) : '';
     $data['galleries']->where("category_id = '{$id}'")->order_by('id', 'desc')->get_page(limit());
     if ($group) {
         $data['group'] = new group($data['galleries']->category->user->group_id);
         $this->template->set_layout('group_blank');
     }
     $this->template->build('gallery_view', $data);
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:14,代码来源:galleries.php


示例19: index

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


示例20: index

 function index($id = FALSE)
 {
     if ($id) {
         $data['user'] = new User($id);
         $data['user']->executive->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'")->order_by('id', 'desc')->get_page(limit());
         $this->template->build('index_id', $data);
     } else {
         $users = new User();
         $data['users'] = $users->where("level_id = 6")->order_by('id', 'desc')->get(1);
         $data['executive_infos'] = new Executive_info();
         $data['executive_infos']->order_by('id', 'desc')->get(5);
         $data['executive_its'] = new Executive_it();
         $data['executive_its']->order_by('id', 'desc')->get(5);
         $executives = new Executive();
         lang_filter($executives->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'"));
         $data['executives'] = $executives->order_by('id', 'desc')->get(5);
         $data['videos'] = new Executive_video();
         $data['videos']->order_by('id', 'desc')->get(5);
         $this->template->build('index', $data);
     }
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:21,代码来源:executives.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP limit_chars函数代码示例发布时间:2022-05-15
下一篇:
PHP like_function函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap