Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Allow multiple level path variables for @result like @result.product.product_id
givanz136352b59376
diff --git a/system/sqlp/sqlp.php b/system/sqlp/sqlp.phpindex 18902b5..4f85105 100755--- a/system/sqlp/sqlp.php+++ b/system/sqlp/sqlp.php@@ -375,8 +375,7 @@ class Sqlp {$lex = new Lexer($this->config['tokenMap'], $this->config['macroMap']);$structure = $lex->lex($statement);- //\Vvveb\d($structure);- //die();+$output = $lex->treeMacro($structure);$statement = $lex->treeToPhp($output, $this->config['macroMap']);@@ -384,17 +383,14 @@ class Sqlp {//replace result variables$statement =preg_replace_callback(- '/@result.(\w+)/',+ '/@result\.([\w\.]+)/',function ($matches) {- $key = $matches[1];+ $key = \Vvveb\dotToArrayKey('$results.' . $matches[1]);- return "' . (isset(\$results['$key']) ? \$results['$key'] : 'NULL') . '";- //return "' . \$results['". $matches[1] . "'] . '";+ return "' . (isset($key) ? $key : 'NULL') . '";},$statement);- //$variable-//FILTERif (preg_match_all($this->config['filterRegex'], $statement, $matches, PREG_SET_ORDER)) {foreach ($matches as $match) {