0
我使用codeigniter爲我的網站,但我有一個問題,我做了腳本誰從不同的表中返回行。但它寫我錯誤試圖獲得非對象的屬性。這是我的代碼。問題在哪裏?Codeigniter獲得行
$this->db->select('*');
$this->db->from('orders');
$this->db->where('order_id',$order_id);
$array_keys_values = $this->db->get();
$row = $array_keys_values->row();
$this->db->select('*');
$this->db->from('pacients');
$this->db->where('pacient_account_id',$row->order_pacient_id);
$array_keys_values2 = $this->db->get();
$row2 = $array_keys_values2->row();
$this->db->select('*');
$this->db->from('doctors');
$this->db->where('doctor_account_id',$doctor_id);
$array_keys_values3 = $this->db->get();
$row3 = $array_keys_values3->row();
這是錯誤http://i45.tinypic.com/2lwuqt3.jpg –
您是否在數據庫配置中啓用了'db_debug'?似乎'$ this-> db-> get()'返回false,這可能意味着生成的查詢是無效的(沒有這樣的表/列)等等。 – complex857
是的,我把db_debug設置爲TRUE。但我的問題是確定的。 –