0
我想比較存儲時間格式爲09:30:14的db列與存儲時間格式相同的php變量。我想檢查存儲在dbcolumn時間是存儲在PHP運行時間不到2個miutes使用mysql.I希望在此基礎上檢查retireve一些值如何檢查時間是否在給定的時間間隔範圍內
$ordertime_present = 09:32:14;
$ordertime_before = 09:30:14;
$sql = "select count(keyid) as key_id_count from key_master where orderdate='$orderdate'
and ordertime between '$ordertime_present' and '$ordertime_before'";