sql syntax

This commit is contained in:
Laurent Destailleur 2024-03-11 14:56:36 +01:00
parent 4d8e5bb2a7
commit 66c40264d1

View file

@ -556,17 +556,17 @@ if (count($filter) > 0) {
} elseif ($key == 't.tms<=') {
$sqlwhere[] = "t.tms <= '".$db->idate($value)."'";
} elseif ($key == 't.date_creation>=') {
$sqlwhere[] = 't.date_creation >= \''.$db->idate($value).'\'';
$sqlwhere[] = "t.date_creation >= '".$db->idate($value)."'";
} elseif ($key == 't.date_creation<=') {
$sqlwhere[] = 't.date_creation <= \''.$db->idate($value).'\'';
$sqlwhere[] = "t.date_creation <= '".$db->idate($value)."'";
} elseif ($key == 't.date_export>=') {
$sqlwhere[] = 't.date_export >= \''.$db->idate($value).'\'';
$sqlwhere[] = "t.date_export >= '".$db->idate($value)."'";
} elseif ($key == 't.date_export<=') {
$sqlwhere[] = 't.date_export <= \''.$db->idate($value).'\'';
$sqlwhere[] = "t.date_export <= '".$db->idate($value)."'";
} elseif ($key == 't.date_validated>=') {
$sqlwhere[] = 't;date_validate >= \''.$db->idate($value).'\'';
$sqlwhere[] = "t;date_validate >= '".$db->idate($value)."'";
} elseif ($key == 't.date_validated<=') {
$sqlwhere[] = 't;date_validate <= \''.$db->idate($value).'\'';
$sqlwhere[] = "t;date_validate <= '".$db->idate($value)."'";
} elseif ($key == 't.credit' || $key == 't.debit') {
$sqlwhere[] = natural_search($key, $value, 1, 1);
} elseif ($key == 't.reconciled_option') {