Merged in gproly/processmaker/HOR-91 (pull request #3552)

HOR-91
This commit is contained in:
Julio Cesar Laura Avendaño
2016-01-27 17:02:04 -04:00
2 changed files with 64 additions and 8 deletions

View File

@@ -176,9 +176,9 @@ class pmDynaform
$json->sql = "";
$json->optionsSql = array();
if ($json->dbConnection !== "" && $json->dbConnection !== "none" && $json->sql !== "") {
$cnn = Propel::getConnection($json->dbConnection);
$stmt = $cnn->createStatement();
try {
$cnn = Propel::getConnection($json->dbConnection);
$stmt = $cnn->createStatement();
$sql = G::replaceDataField($json->sql, $this->getValuesDependentFields($json));
$rs = $stmt->executeQuery($sql, \ResultSet::FETCHMODE_NUM);
while ($rs->next()) {