суть в том что нужно сделать фильтрацию по фамилии и имени, как в функцию добавить выборку? Код (PHP): $data=mysql_query("Select first_name, last_name FROM users WHERE users_id='{$users_id}'"); в этот код как вставить выборку? Код (PHP): public function getUsersPlusSites($userID = '') { $return = array(); //get the app users if( $userID == '' ) { $users = $this->ion_auth->users()->result(); } else { $users = $this->ion_auth->user($userID)->result(); } foreach( $users as $user ) { $temp = array(); $temp['userData'] = $user; if( $this->ion_auth->is_admin( $user->id ) ) { $temp['is_admin'] = 'yes'; } else { $temp['is_admin'] = 'no'; } //get this user's sites $temp['sites'] = $this->sitemodel->all( $user->id ); //push into the final array $return[] = $temp; } //die( print_r($return) ); return $return; }