laravel 中将DB::select() 得到的内容转为数组

1 $sql = "select order_id from ecs_order_info where order_status=1 and pay_status=2";
2 $result=DB::select($sql);
3 $ids = array_map('get_object_vars', $result);

 

posted @ 2020-05-25 17:20  糖糖Y  阅读(2370)  评论(0编辑  收藏  举报