Skip to content
Snippets Groups Projects
Commit 86454952 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Bugfixes SqlBuilder usage

parent 67c65f0c
No related branches found
No related tags found
No related merge requests found
import("system.db");
import("system.translate");
import("system.vars");
import("system.result");
import("KeywordRegistry_basic");
import("Keyword_lib");
import("Sql_lib");
result.string(translate.text(new SqlBuilder().select("NAME_LATIN ").from("AB_LANGUAGE")
.where().andPrepareVars("AB_LANGUAGE.ISO3", "$field.LANG")
.cell()));
\ No newline at end of file
result.string(translate.text(newSelect("NAME_LATIN")
.from("AB_LANGUAGE")
.whereIfSet("AB_LANGUAGE.ISO3", "$field.LANG")
.cell(true)));
\ No newline at end of file
......@@ -7,7 +7,7 @@ var cond = newWhere()
if (vars.getString("$param.ExcludedIds_param"))
{
cond.and("AB_LANGUAGE.ISO3", JSON.parse(vars.getString("$param.ExcludedIds_param")), SqlBuilder.NOT_IN())
cond.andIfSet("AB_LANGUAGE.ISO3", JSON.parse(vars.getString("$param.ExcludedIds_param")), SqlBuilder.NOT_IN())
}
//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026
......
......@@ -210,8 +210,9 @@ ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProduc
this.join(pJoin[1], pJoin[3], pJoin[2], pJoin[0]);
}, productDataSql)
var ProductData = productDataSql.orderBy(orderby)
.and("PRODUCT.PRODUCTID", pid)
var ProductData = productDataSql
.where("PRODUCT.PRODUCTID", pid)
.orderBy(orderby)
.table();
for (var i = 0; i < ProductData.length; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment