Newer
Older
Johannes Goderbauer
committed
import("system.db");
Johannes Goderbauer
committed
import("Sql_lib");
//TODO: this should happen by 1:1 links instead of manually requesting the data by a select (getRows ??)
var country = newSelect("ADDRESS.COUNTRY")
.from("ADDRESS")
.join("CONTACT", "CONTACT.ADDRESS_ID = ADDRESS.ADDRESSID")

Sebastian Pongratz
committed
.whereIfSet("CONTACT.CONTACTID", "$param.ObjectRowId_param")
Johannes Goderbauer
committed
if (country != "")
result.string(country);