This commit is contained in:
Roly Rudy Gutierrez Pinto
2016-01-21 11:42:26 -04:00
parent 7b2d2ba2aa
commit d05a121720
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()) {