$between['date_from'] = date("Y-m-d", strtotime($date3))." 00:00:00";
$between['date_to'] = date("Y-m-d",strtotime($date4))." 23:59:59";
$query = "SELECT * FROM justshawarma_nexo_commandes where REF_CLIENT = '$uuc' and DATE_CREATION BETWEEN '".$between['date_from']."' AND '".$between['date_to']."';
$query = "SELECT * FROM justshawarma_nexo_commandes
where REF_CLIENT = \'$uuc\'
and DATE_CREATION like %\'$date3\'%
and DATE_CREATION like %\'$date4\'%";
介于
$query = "SELECT * FROM justshawarma_nexo_commandes
where REF_CLIENT = \'$uuc\'
and DATE_CREATION Between \'$date3 00:00:00\'
and \'$date4 23:59:59\'";
4条答案
按热度按时间bsxbgnwa1#
试试这个。这对我来说很好,这是我订单的一部分,有日期:
nqwrtyyt2#
odopli943#
在条件之间使用:
kpbwa7wx4#
使用like,您的查询将如下所示
介于
正如您所说,您的列中有时间,因此您可以使用这些查询选择该日期范围内的所有记录。