FCLT#52530 bugfix in sql; {1=1 or 2=2 and 1=2} != {(1=1 or 2=2) and 1=1} -> gecorrigeerd
svn path=/Website/branches/v2017.3/; revision=37363
This commit is contained in:
@@ -2091,11 +2091,11 @@ ins = {checkAutLevel:
|
|||||||
else if (inspSoon) // Binnenkort is aangevinkt.
|
else if (inspSoon) // Binnenkort is aangevinkt.
|
||||||
{
|
{
|
||||||
if (dtsoonfrom != null && dtsoonto != null) // Binnenkort.
|
if (dtsoonfrom != null && dtsoonto != null) // Binnenkort.
|
||||||
sql = "SELECT * FROM (" + sql + ") x WHERE COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) BETWEEN " + dtsoonfrom.toSQL(true) + " AND " + dtsoonto.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "");
|
sql = "SELECT * FROM (" + sql + ") x WHERE (COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) BETWEEN " + dtsoonfrom.toSQL(true) + " AND " + dtsoonto.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "") + ")";
|
||||||
else if (dtsoonfrom == null && dtsoonto != null) // Te laat + binnenkort.
|
else if (dtsoonfrom == null && dtsoonto != null) // Te laat + binnenkort.
|
||||||
sql = "SELECT * FROM (" + sql + ") x WHERE COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) < " + dtsoonto.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "");
|
sql = "SELECT * FROM (" + sql + ") x WHERE (COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) < " + dtsoonto.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "") + ")";
|
||||||
else if (dtsoonfrom != null && dtsoonto == null) // Binnenkort + toekomst.
|
else if (dtsoonfrom != null && dtsoonto == null) // Binnenkort + toekomst.
|
||||||
sql = "SELECT * FROM (" + sql + ") x WHERE COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) >= " + dtsoonfrom.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "");
|
sql = "SELECT * FROM (" + sql + ") x WHERE (COALESCE(ins_deelsrtcontrole_plandatum, inspectie_next) >= " + dtsoonfrom.toSQL(true) + (sqlBC != ''? " OR " + sqlBC : "") + ")";
|
||||||
else if (dtsoonfrom == null && dtsoonto == null)
|
else if (dtsoonfrom == null && dtsoonto == null)
|
||||||
sql = "SELECT * FROM (" + sql + ") x WHERE 1 = 1"; // Alles tonen onafhankelijk van sqlBC.
|
sql = "SELECT * FROM (" + sql + ") x WHERE 1 = 1"; // Alles tonen onafhankelijk van sqlBC.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user