The below is the mysql query to get records between the given times..
$now = date('H:i',time());
$time_restriction = "from_time <= '$now' and to_time >= '$now' ";
$sql = "SELECT * FROM tblName WHERE $time_restriction ";
$now = date('H:i',time());
$time_restriction = "from_time <= '$now' and to_time >= '$now' ";
$sql = "SELECT * FROM tblName WHERE $time_restriction ";
0 comments:
Post a Comment