Fix trip export to csv
This commit is contained in:
+2
-2
@@ -60,10 +60,10 @@ if (isset($_POST['export_trips_csv'])) {
|
|||||||
$date_from = sanitizeInput($_POST['date_from']);
|
$date_from = sanitizeInput($_POST['date_from']);
|
||||||
$date_to = sanitizeInput($_POST['date_to']);
|
$date_to = sanitizeInput($_POST['date_to']);
|
||||||
if (!empty($date_from) && !empty($date_to)){
|
if (!empty($date_from) && !empty($date_to)){
|
||||||
$date_query = "AND DATE(trip_date) BETWEEN '$date_from' AND '$date_to'";
|
$date_query = "DATE(trip_date) BETWEEN '$date_from' AND '$date_to'";
|
||||||
$file_name_date = "$date_from-to-$date_to";
|
$file_name_date = "$date_from-to-$date_to";
|
||||||
} else {
|
} else {
|
||||||
$date_query = "";
|
$date_query = "trip_date IS NOT NULL";
|
||||||
$file_name_date = date('Y-m-d');
|
$file_name_date = date('Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user