示例#1
0
	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');
	}
示例#2
0
 public function _common_query()
 {
     parent::_common_query();
     $this->db->order_by('publish_date', 'desc');
 }
 /**
  * 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');
 }
 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');
 }
 function _common_query()
 {
     parent::_common_query();
     $this->db->order_by('start_date asc');
 }
示例#6
0
 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);
     }
 }
示例#7
0
 /**
  * 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');
 }
 function _common_query()
 {
     parent::_common_query();
 }
示例#9
0
 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');
 }
示例#10
0
 function _common_query()
 {
     parent::_common_query();
     $this->db->order_by('precedence, name asc');
 }
示例#11
0
 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');
 }
 public function _common_query($display_unpublished_if_logged_in = NULL)
 {
     parent::_common_query($display_unpublished_if_logged_in);
 }