I'm creating an basic Zodiac signs app and I got stuck at this issue. Basically, I just want to check if today falls between a particular date range in the mysql table.
This is my table: Zodia Signs Table
$date = "2019-03-09"
$zodiacSign = DB::table('zodiac_signs')
->where(function ($query) use($date){
$query->where('from_date', '<=', $date)
->where('to_date', '>=', $date);
})->get();
Every date except the date between 2019-12-22 and 2019-01-19 is working as expected. What am I doing wrong here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire