summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Data/TDbCommand.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php
index df34207c..7ae32d17 100644
--- a/framework/Data/TDbCommand.php
+++ b/framework/Data/TDbCommand.php
@@ -222,7 +222,7 @@ class TDbCommand extends TComponent
if($this->_statement instanceof PDOStatement)
$this->_statement->execute();
else
- $this->_statement=$this->getConnection()->getPdoInstance()->query($sql);
+ $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
$result=$this->_statement->fetch($fetchAssociative ? PDO::FETCH_ASSOC : PDO::FETCH_NUM);
$this->_statement->closeCursor();
return $result;
@@ -247,7 +247,7 @@ class TDbCommand extends TComponent
if($this->_statement instanceof PDOStatement)
$this->_statement->execute();
else
- $this->_statement=$this->getConnection()->getPdoInstance()->query($sql);
+ $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
$result=$this->_statement->fetchColumn();
$this->_statement->closeCursor();
if($result!==false)