plugins/finder/categories/categories.php
protected function getStateQuery()
	{
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('a.id'))
			->select($this->db->quoteName('a.parent_id'))
			->select('a.' . $this->state_field . ' AS state, c.published AS cat_state')
			->select('a.access, c.access AS cat_access')
			->from($this->db->quoteName('#__categories') . ' AS a')
			->join('LEFT', '#__categories AS c ON c.id = a.parent_id');

		return $query;
	}
protected function getStateQuery()
	{
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('a.id'))
			->select($this->db->quoteName('a.parent_id'))
			->select('a.' . $this->state_field . ' AS state, c.published AS cat_state')
			->select('a.access, c.access AS cat_access')
			->from($this->db->quoteName('#__categories') . ' AS a')
			->join('LEFT', '#__categories AS c ON c.id = a.parent_id');

		return $query;
	}
protected function getStateQuery ( ) { $ query = $ this -> db -> getQuery ( true ) -> select ( $ this -> db -> quoteName ( 'a.id' ) ) -> select ( $ this -> db -> quoteName ( 'a.parent_id' ) ) -> select ( 'a.' . $ this -> state_field . ' AS state, c.published AS cat_state' ) -> select ( 'a.access, c.access AS cat_access' ) -> from ( $ this -> db -> quoteName ( '#__categories' ) . ' AS a' ) -> join ( 'LEFT' , '#__categories AS c ON c.id = a.parent_id' ) ; return $ query ; }
Method to get a SQL query to load the published and access states for
a category and its parents.

@return  JDatabaseQuery  A database object.

@since   2.5
Method to get a SQL query to load the published and access states for a category and its parents .