echo " Date 1<input type=\"datetime-local\" name=\"calendar1\">";
echo " Date 2<input type=\"datetime-local\" name=\"calendar2\">";
$date1 = $_POST['calendar1'];
$date2 = $_POST['calendar2'];
$date1___ = str_replace("T"," ",$date1);
$date2___ = str_replace("T"," ",$date2);
$date1__ = $date1___.":00";
$date2__ = $date2___.":00";
$date1_ = date("Y-m-d H:i:s", strtotime($date1__));
$date2_ = date("Y-m-d H:i:s", strtotime($date2__));
$query = "SELECT $comma_separated FROM first_table where price between $dip1 and $dip2 and count between $dip3 and $dip4 and deliverydate between $date1_ AND $date2_ ORDER BY $radio ASC ";
SELECT id,name,sex,goodsname,address FROM first_table where price between 313 and 3131 and count between 31 and 313 and deliverydate between 2018-02-01 00:00:00 AND 2019-01-01 00:03:00 ORDER BY count ASC Вот здесь выдает ошибку, что неправильно в запросе and deliverydate between 2018-02-01 00:00:00 AND 2019-01-01 00:03:00
Строки с датами должны быть заключены в апострофы:
$query = "
SELECT $comma_separated
FROM first_table
where
price between $dip1 and $dip2
and count between $dip3 and $dip4
and deliverydate between '$date1_' AND '$date2_'
ORDER BY $radio ASC
";
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Перевод документов на английский язык: Важность и ключевые аспекты
Я работаю над модулем для Prestashop 17, проблема связана с хуком