我是從2頁不同的表運行查詢選擇數據:笨不返回相同的結果,查詢
$this->db->select('a.any_id, a.name');
$this->db->from('table1 a, table2 b');
$this->db->where('a.any_id = b.any_id');
$this->db->where('b.other_id = "$myId"');
如果運行此查詢在phpMyAdmin它返回了一定的效果,但是當我運行笨驗證碼它返回一個空數組。
任何提示?這真讓我抓狂。
'''$這個 - > DB->選擇( 'a.any_id,a.name'); $ this-> db-> from('table1 a,table2 b'); $ this-> db-> where('a.any_id = b.any_id',NULL); ('b.other_id =「$ myId」',NULL); $ query = $ this-> db-> get(); return $ query-> result();''' – Mohammad
不,它沒有工作。相同的0結果與之前的 –
和此'''$ this-> db-> select('a.any_id,a.name'); $ this-> db-> from('table1 a,table2 b'); $ this-> db-> where('a.any_id','b.any_id'); $ this-> db-> where('b.other_id',$ myId); $ query = $ this-> db-> get(); return $ query-> result();''' – Mohammad