当前位置:Gxlcms > 数据库问题 > laravel 使用DB 鏈接leftJoin查詢

laravel 使用DB 鏈接leftJoin查詢

时间:2021-07-01 10:21:17 帮助过:64人阅读

$product_count = DB::table(‘fook_platform_orderrefund as a‘) 2 ->leftJoin(‘fook_platform_orderinfo as i‘,‘a.orderinfo_id‘, ‘=‘ ,‘i.id‘) 3 ->whereBetween(‘a.refund_time‘,[date(‘Y-m-d 00:00:00‘, strtotime("-$i days")), date(‘Y-m-d 23:59:59‘, strtotime("-$i days"))]) 4 ->count("a.id");

 

laravel 使用DB 鏈接leftJoin查詢

标签:leftjoin   date   time   fun   code   使用   laravel   pre   bsp   

人气教程排行