【发布时间】:2019-01-16 09:00:50
【问题描述】:
如何获取用户从类似 html 表单输入的日期 (from-dates & to_dates ) 之间的所有数据。当用户输入日期时,从 (1\1\2019) 到 (30\1\2019)
我想检查 MySQL 表中日期之间的两个日期
我试过了:
$from = $_POST['from'];
$end = $_POST['end '];
$sql = "SELECT * FROM table_name WHERE '" . $from . "' between
from_date and to_date and '" . $end . "' between from_date and
to_date
";
mysql 表中的 from_date 和 to_date...col
【问题讨论】:
-
未使用精确查询