Код: Выделить всё
public function all_ratings(){
$result_ratings = $data['result_ratings'] ;
**(I have successfully captured '$result_ratings' data here)**
$first_names = array_column($result_ratings, 'customer_id');
$data['result_cus'] =$this->mod_customers->get_unique_customer($first_names);
//var_dump($data['result_cus']); die();
data['related_view']='system_rating_appointments';
$this->load->view('template', $data);
}
Код: Выделить всё
public function get_unique_customer($first_names){
$this->load->database();
$this->db->where('id', $first_names);
$query = $this->db->get($this->table);
return $query->result_array();
}
Произошла ошибка базы данных
Номер ошибки: 1054
Неизвестный столбец «Массив» в разделе «where»
SELECT * FROM tbl_customer WHERE id = Массив
Имя файла: C:/wamp64/www/theme/system/database/DB_driver.php
Номер строки: 691
Привет всем! Я новичок в codeignitor. Я хочу получить записи для каждого значения массива из приведенной выше таблицы. Но произошла ошибка. Пожалуйста, помогите мне.
Примечание: база данных и таблица определены в верхней части страницы модели
Подробнее здесь: https://stackoverflow.com/questions/493 ... g-an-array
Мобильная версия