jeudi 2 juin 2016

How to update time to NOW()?

I want to set a date field to NOW() if it's outdated. Here is the query I'm trying to run without success:

DB::table('quizzes')->update('date', DB::raw('NOW()'))->where('date', '<', DB::raw('NOW()'))

How do I fix it?

P.S
I don't want to deal with Carbon, if possible, to avoid the server/DB time difference issues.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Ukdak2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire