I am try to say wishes to customer based on time.I have a wishes in db as a name of wishe based on the query result how to select the wishe column in db.
$wishes= DB::table('wishes')
->select(DB::raw("DATE(D.datumTijd)",
DB::raw("(CASE WHEN TIME(D.datumTijd) BETWEEN '08:00:00' AND '12:00:00' THEN 1
WHEN TIME(D.datumTijd) BETWEEN '14:00:00' AND '20:00:00' THEN 2
WHEN TIME(D.datumTijd) BETWEEN '20:00:00' AND '24:00:00' THEN 3
END) as result")))->get()
;
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1SIfIIQ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire