summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/TDbCommand.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php
index caa4476b..90e86844 100644
--- a/framework/Data/TDbCommand.php
+++ b/framework/Data/TDbCommand.php
@@ -276,7 +276,10 @@ class TDbCommand extends TComponent
$this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
$result=$this->_statement->fetchColumn();
$this->_statement->closeCursor();
- return $result;
+ if(is_resource($result) && get_resource_type($result)==='stream')
+ return stream_get_contents($result);
+ else
+ return $result;
}
catch(Exception $e)
{