I have two times in mysql DB start 10:00 and end 18:00 now i want to check with PHP if time is not greater or less of this two times how to do it? Thanks Mysql is set to TIME only no datetime, basically i want to check if time now is not between start and end. start represent = from2 and end represent to2. Day_id is week day .this is what is not working
$time_now = date("H:i");
//in DB format 00:00 // time
echo "SELECT * FROM opening_hrs WHERE
(TIME(from2) > TIME('".$time_now."') AND TIME(to2) < TIME('".$time_now."') )
AND day_id=".$day_id;
any ideas how to check time("H:i"); between to times from DB?