PMCORE-1049

This commit is contained in:
Julio Cesar Laura Avendaño
2020-01-16 14:28:53 -04:00
parent 03ea91c94d
commit 4416a4fe4f
2 changed files with 17 additions and 2 deletions

View File

@@ -1023,8 +1023,17 @@ class PmDynaform
. " JOIN "
. $dt[$key]["table"]
. ($dt[$key]["table"] == $dt[$key]["alias"] ? "" : " " . $dt[$key]["alias"]) . " "
. $dt[$key]["ref_type"] . " "
. rtrim($dt[$key]["ref_clause"], " INNER");
. $dt[$key]["ref_type"] . " ";
// Get the last 6 chars of the string
$tempString = mb_substr($dt[$key]["ref_clause"], -6);
// If the last section is a "INNER" statement we need to remove it
if (strcasecmp($tempString, " INNER") === 0) {
$from .= mb_substr($dt[$key]["ref_clause"], 0, mb_strlen($dt[$key]["ref_clause"]) - 6);
} else {
$from .= $dt[$key]["ref_clause"];
}
}
}
}