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


PHP Base_module_model::_common_query方法代码示例

本文整理汇总了PHP中Base_module_model::_common_query方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_module_model::_common_query方法的具体用法?PHP Base_module_model::_common_query怎么用?PHP Base_module_model::_common_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_module_model的用法示例。


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

示例1:

	function _common_query()
	{
		parent::_common_query();
		$this->db->select($this->_tables['navigation'].'.*, '.$this->_tables['navigation_groups'].'.id group_id, '.$this->_tables['navigation_groups'].'.name group_name');
		$this->db->join($this->_tables['navigation_groups'], $this->_tables['navigation_groups'].'.id='.$this->_tables['navigation'].'.group_id', 'left');
		$this->db->order_by('precedence, location asc');
	}
开发者ID:rodrigowebe,项目名称:FUEL-CMS,代码行数:7,代码来源:navigation_model.php

示例2: _common_query

 public function _common_query()
 {
     parent::_common_query();
     $this->db->order_by('publish_date', 'desc');
 }
开发者ID:nonconforme,项目名称:FUEL-CMS,代码行数:5,代码来源:careers_model.php

示例3: _common_query

 /**
  * Overwrites the _common_query parent method to automatically sort by precedence value
  *
  * @access	public
  * @param mixed parameter to pass to common query (optional)
  * @return	array
  */
 public function _common_query($params = NULL)
 {
     parent::_common_query();
     $this->db->order_by('precedence asc');
 }
开发者ID:scotton34,项目名称:sample,代码行数:12,代码来源:fuel_categories_model.php

示例4: _common_query

 public function _common_query($display_unpublished_if_logged_in = NULL)
 {
     parent::_common_query($display_unpublished_if_logged_in);
     $this->db->select($this->_tables['form_entries'] . '.*, ' . $this->_tables['forms'] . '.name as form');
     $this->db->join($this->_tables['forms'], $this->_tables['forms'] . '.name = ' . $this->_tables['form_entries'] . '.form_name', 'LEFT');
     // remove if no precedence column is provided
     $this->db->order_by('date_added desc');
 }
开发者ID:aaronharding,项目名称:FUEL-CMS-Forms-Module,代码行数:8,代码来源:form_entries_model.php

示例5:

 function _common_query()
 {
     parent::_common_query();
     $this->db->order_by('start_date asc');
 }
开发者ID:ressphere,项目名称:cb_iloveproperty,代码行数:5,代码来源:events_model.php

示例6: _common_query

 public function _common_query($display_unpublished_if_logged_in = NULL)
 {
     parent::_common_query($display_unpublished_if_logged_in);
     $rel_join = $this->_tables['fuel_relationships'] . '.candidate_key = ' . $this->table_name . '.id AND ';
     $rel_join .= $this->_tables['fuel_relationships'] . '.candidate_table = "' . $this->table_name . '" AND ';
     $rel_join .= $this->_tables['fuel_relationships'] . '.foreign_table = "' . $this->_tables['fuel_tags'] . '"';
     $this->db->join($this->_tables['fuel_relationships'], $rel_join, 'left');
     $this->db->join($this->_tables['fuel_tags'], $this->_tables['fuel_tags'] . '.id = ' . $this->_tables['fuel_relationships'] . '.foreign_key', 'left');
     $this->db->select($this->table_name . '.*');
     $this->db->select('YEAR(' . $this->table_name . '.' . $this->order_by_field . ') as year, DATE_FORMAT(' . $this->table_name . '.' . $this->order_by_field . ', "%m") as month, DATE_FORMAT(' . $this->table_name . '.' . $this->order_by_field . ', "%d") as day,', FALSE);
     $this->db->order_by($this->order_by_field . ' ' . $this->order_by_direction);
     $this->db->group_by($this->table_name . '.id');
     if (!empty($this->foreign_keys['category_id'])) {
         $this->db->join('fuel_categories', 'fuel_categories.id = ' . $this->table_name . '.category_id', 'LEFT');
         $this->db->select($this->table_name . '.*, fuel_categories.slug as category_slug, fuel_categories.id as category_id', FALSE);
     }
 }
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:17,代码来源:base_posts_model.php

示例7: _common_query

 /**
  * Common query to automatically join the categories table
  *
  * @access	public
  * @param mixed parameter to pass to common query (optional)
  * @return	void 	
  */
 public function _common_query($params = NULL)
 {
     parent::_common_query();
     $this->db->join($this->_tables['fuel_categories'], $this->_tables['fuel_categories'] . '.id = ' . $this->_tables['fuel_tags'] . '.category_id', 'LEFT');
 }
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:12,代码来源:fuel_tags_model.php

示例8:

 function _common_query()
 {
     parent::_common_query();
 }
开发者ID:jpswade,项目名称:FUEL-CMS-Social-Module,代码行数:4,代码来源:social_icons_model.php

示例9: _common_query

 public function _common_query($display_unpublished_if_logged_in = NULL)
 {
     parent::_common_query($display_unpublished_if_logged_in);
     $this->db->order_by('publish_date', 'desc');
 }
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:5,代码来源:careers_model.php

示例10: CONCAT

 function _common_query()
 {
     parent::_common_query();
     $this->db->select($this->_tables['blog_posts'] . '.*, ' . $this->_tables['blog_users'] . '.display_name, CONCAT(' . $this->_tables['fuel_users'] . '.first_name, " ", ' . $this->_tables['fuel_users'] . '.last_name) as author_name', FALSE);
     $this->db->select('YEAR(' . $this->_tables['blog_posts'] . '.post_date) as year, DATE_FORMAT(' . $this->_tables['blog_posts'] . '.post_date, "%m") as month, DATE_FORMAT(' . $this->_tables['blog_posts'] . '.post_date, "%d") as day,', FALSE);
     $rel_join = $this->_tables['blog_relationships'] . '.candidate_key = ' . $this->_tables['blog_posts'] . '.id AND ';
     $rel_join .= $this->_tables['blog_relationships'] . '.candidate_table = "' . $this->_tables['blog_posts'] . '" AND ';
     $rel_join .= $this->_tables['blog_relationships'] . '.foreign_table = "' . $this->_tables['blog_categories'] . '"';
     $this->db->join($this->_tables['blog_relationships'], $rel_join, 'left');
     $this->db->join($this->_tables['blog_users'], $this->_tables['blog_users'] . '.fuel_user_id = ' . $this->_tables['blog_posts'] . '.author_id', 'left');
     $this->db->join($this->_tables['fuel_users'], $this->_tables['fuel_users'] . '.id = ' . $this->_tables['blog_posts'] . '.author_id', 'left');
     $this->db->join($this->_tables['blog_categories'], $this->_tables['blog_categories'] . '.id = ' . $this->_tables['blog_relationships'] . '.foreign_key', 'left');
     $this->db->group_by($this->_tables['blog_posts'] . '.id');
 }
开发者ID:pwhsueh,项目名称:voting,代码行数:14,代码来源:blog_posts_model.php

示例11: _common_query

 public function _common_query($display_unpublished_if_logged_in = NULL)
 {
     parent::_common_query($display_unpublished_if_logged_in);
 }
开发者ID:daylightstudio,项目名称:FUEL-CMS-Forms-Module,代码行数:4,代码来源:Forms_model.php


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