Код: Выделить всё
public function get_data_for_reminder($id)
{
$this->db->select('nama_user, keluhan, email, addresed_to');
$query = $this->db->get_where('tbl_requestfix', array('id_request' => $id));
return $query->row();
}
< /code>
И я пытаюсь получить доступ к нему от May Controller: < /p>
public function reminderIT()
{
$id = $this->input->post('id');
$data = $this->model_request->get_data_for_reminder($id);
< /code>
Как я могу правильно генерировать результаты запроса?foreach ($data as $d) {
$name = $d['nama_user'];
}
echo json_encode($name);
Подробнее здесь: https://stackoverflow.com/questions/303 ... -the-query