查询2时之间在2数据库表,这是我的数据库查询2时之间在PHP 2数据库表和PHP和MYSQL</p> <p>MYSQL
| time1 | time2 |
| 15:00 | 17:00 |
然后我想表明,如果它已经在查询码2数据库表之间的时间
例如
$a = '14:00';
$b = '16:00';
if($a <= $time1 && $b >=$time2){
echo 'it already has a time in the database';
}else{
echo 'dont have time in the database';
}
output will be
it already has a time in the database
在此先感谢 我想要一个查询该示例。再次感谢
',其中“$ A” <=时间1和“$ B”> = time2' – Barmar
它不工作 –