diff options
author | xue <> | 2008-02-06 18:01:14 +0000 |
---|---|---|
committer | xue <> | 2008-02-06 18:01:14 +0000 |
commit | 2c48bf162f2a8e7cf13e8c53b1205cc0f65132e5 (patch) | |
tree | a423b807a5016684ba8b97dac19f5118adca7beb /framework/Data | |
parent | abe35ff7bb2b7bdca24ac39e57be7a0b3ed4a330 (diff) |
Fixed ticket#766, #786 - TDbCache does not work with MySQL and PostgreSQL
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/TDbCommand.php | 5 |
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)
{
|