如何查询:
SELECT *
FROM invoice_client
WHERE date_sending < DATE_ADD(NOW(), INTERVAL -90 DAY) AND
date_sending <> '0000-00-00' AND
approve <> '1'
laravel版本中的?
答案 0 :(得分:0)
DB::table('invoice_client')
->where("date_sending","!=","0000-00-00")
->where("date_sending",">",date("Y-m-d",time()-3600*24*90))
->where("approve","!=",1)
->get();
你可以试试上面的代码吗?