當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。