diff --git a/src/Sql/AbstractSql.php b/src/Sql/AbstractSql.php index 9265325..563a566 100644 --- a/src/Sql/AbstractSql.php +++ b/src/Sql/AbstractSql.php @@ -350,8 +350,12 @@ public function quoteId(string $identifier): string $identifierAry[$key] = ($val != '*') ? $this->openQuote . $val . $this->closeQuote : $val; } $quotedId = implode('.', $identifierAry); + } else if (($identifier != '*') && + ((preg_match('/^\$\d*\d$/', $identifier) == 0) && !is_int($identifier) && + !is_float($identifier) && (preg_match('/^\d*$/', $identifier) == 0))) { + $quotedId = $this->openQuote . $identifier . $this->closeQuote; } else { - $quotedId = ($identifier != '*') ? $this->openQuote . $identifier . $this->closeQuote : $identifier; + $quotedId = $identifier; } return $quotedId; @@ -452,4 +456,4 @@ protected function initQuoteType(): void } } -} \ No newline at end of file +}