FuelPHPのSelectクラスを用いてJoinしたカラムを配列で出力したいです。
php
1$query = DB::select( 2 'tableA.primary_id' 3 'tableA.name', 4 'tableA.mail', 5 'tableB.age', 6 'tableB.gender', 7 'tableB.bussiness' 8 ) 9 ->from('tableA') 10 ->join('tableB') 11 ->on('tableA.primary_id','=','tableB.primary_id'); 12 13 14 $query->where_open() 15 ->where('gender','=','man') 16 ->and_where('age','=','24') 17 ->and_where('bussiness','=','student') 18 ->where_close() 19 ->execute(); 20 21$result = $query->as_array();
上記のコードだと
Call to undefined method Fuel\Core\Database_Query_Builder_Select::as_array()
というエラーがでてきます。
どなたかご教授お願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/10 04:07