public function find_all($sort_field = null)
 {
     $result_array = parent::find_all();
     if (null != $sort_field) {
         $output_array = array();
         if (is_array($result_array) and count($result_array)) {
             foreach ($result_array as $key => $record) {
                 $output_array[$record->{$sort_field}] = $record;
             }
         }
         $result_array = $output_array;
     }
     return $result_array;
 }
Ejemplo n.º 2
0
 /**
  * Find all user records and the associated role information.
  *
  * @return boolean An array of objects with each user's information.
  */
 public function find_all()
 {
     return parent::find_all();
 }
Ejemplo n.º 3
0
 public function find_all($show_deleted = false)
 {
     if ($show_deleted === false) {
         $this->db->where('users.deleted', 0);
     }
     $this->db->join('roles', 'roles.role_id = users.role_id', 'left');
     return parent::find_all();
 }
Ejemplo n.º 4
0
 public function find_all($show_deleted = false)
 {
     if (empty($this->selects)) {
         $this->select($this->table . '.*, role_name');
     }
     if ($show_deleted === false) {
         $this->db->where('users.deleted', 0);
     }
     $this->db->join('roles', 'roles.role_id = users.role_id', 'left');
     return parent::find_all();
 }
Ejemplo n.º 5
0
 /**
  * Returns all user records, and their associated role information.
  *
  * @access public
  *
  * @return bool An array of objects with each user's information.
  */
 public function find_all()
 {
     if (empty($this->selects)) {
         $this->select($this->table_name . '.*, role_name');
     }
     $this->db->join($this->roles_table, $this->roles_table . '.role_id = ' . $this->table_name . '.role_id', 'left');
     return parent::find_all();
 }
Ejemplo n.º 6
0
 /**
  * Find all user records and the associated role information.
  *
  * @return boolean An array of objects with each user's information.
  */
 public function find_all()
 {
     $this->preFind();
     return parent::find_all();
 }
Ejemplo n.º 7
0
 public function find_all($show_deleted = false)
 {
     if (empty($this->selects)) {
         $this->select($this->table . '.*, category');
     }
     if ($show_deleted === false) {
         $this->db->where('news_articles.deleted', 0);
     }
     $this->db->join('news_categories', 'news_categories.id = news_articles.category_id', 'left');
     $this->db->join('news_status', 'news_status.id = news_articles.status_id', 'left');
     return parent::find_all();
 }