vendredi 3 mars 2017

Laravel 5 search records 30min and older for today

I am trying to get all records that are 30min old and are today with a field called smsed value = to 0.

What i am trying to do is get all the records in my database with todays date and are older than 30min.

$data = DB::table('applicant')->whereRaw('AppDate < (NOW() - INTERVAL 30 MINUTE)')->where('smsed','=',0)->limit(5000)->get();

what the above does is get all records in the DB and not only for today.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire