Я пытаюсь получить результат моего запроса к представлению, но он всегда заканчивается ошибкой:
Неустранимая ошибка: вызов функции-члена row() для не-объекта в
Я пытаюсь найти информацию о клиенте по идентификатору клиента и пытаюсь получить результат в представлении.< /p>
Это мое мнение:
ID Pelanggan
Nama
Alamat
Golongan
Tarif
Вот мой метод контроллера:
public function cari_id()
{
$this->auth->restrict();
// mencegah user mengakses menu yang tidak boleh ia buka
$this->auth->cek_menu(4);
$this->load->library('form_validation');
$this->form_validation->set_rules('id', 'ID Pelanggan', 'trim|required');
//$this->form_validation->set_rules('nama','Nama','trim'|'required');
//$this->form_validation->set_rules('alamat','Alamat','trim'|'required');
//$this->form_validation->set_rules('gol', 'Golongan', 'trim|required');
//$this->form_validation->set_rules('tarif', 'Tarif', 'trim|required');
$this->form_validation->set_error_delimiters(' ', '');
$id_pel = $this->input->post('id') ;
//$data1 = $this->usermodel->get_list_bayar_pel($id_pel);
//$data=$data1->row();
$data1 = $this->usermodel->get_list_bayar_pel($id_pel);
$data['record'] = $query->result_array();
$this->template->set('title','Input Pembayaran | POS Application');
$this->template->load('template','admin/input_pembayaran',$data);
}
Мой метод модели:
function get_list_bayar_pel($id)
{
$this->db->select('b.name as nama, b.address as alamat, c.nm_gol as golongan,d.rate_value as tarif');
$this->db->from('account_t a, account_nameinfo_t b, golongan_t c, (select rate_value from rate_t a, golongan_t b where a.id_gol = b.id_gol) d');
$this->db->where('a.id_account = b.obj_id');
$this->db->where('a.id_gol = c.id_gol');
$this->db->where('a.id_account = "'.$id.'"');
$result = $this->db->get();
return $result;
}
Подробнее здесь: https://stackoverflow.com/questions/117 ... r-function
Неустранимая ошибка при вызове метода row() в файле представления: «Вызов функции-члена row() для объекта, не являющегос ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Неустранимая ошибка PHP: вызов функции-члена row() для объекта, не являющегося объектом в
Anonymous » » в форуме Php - 0 Ответы
- 76 Просмотры
-
Последнее сообщение Anonymous
-