Вот мой код:
Модель
Код: Выделить всё
public function rp_reach_rate_stmt()
{
$stmt = $this->db->select(array('user_id','user','full_name'))->get('vicidial_users',10);
// $stmt = $this->db->get('vicidial_users',10);
return $stmt->row();
}
Код: Выделить всё
public function rp_reach_rate()
{
$this->load->model('db_model');
$data['sqlstmt'] = $this->rp_reach_rate_get_data();
$this->load->view('RP_ReachRate',$data);
}
private function rp_reach_rate_get_data()
{
$this->load->model('db_model');
$result = $this->db_model->rp_reach_rate_stmt();
return $result;
}
Код: Выделить всё
object(stdClass)#19 (3) { ["user_id"]=> string(1) "1" ["user"]=>
string(4) "6666" ["full_name"]=> string(5) "Admin"
1 6666 Админ
Возможно, я что-то пропустил.
Подробнее здесь: https://stackoverflow.com/questions/375 ... -set-objec
Мобильная версия