summaryrefslogtreecommitdiff
path: root/framework/Data/TDbCommand.php
diff options
context:
space:
mode:
authorwei <>2006-12-03 22:26:04 +0000
committerwei <>2006-12-03 22:26:04 +0000
commit503cdec992e78bf4180fa720800b9d3a3bc551e2 (patch)
tree0a53819ddc430e5224583dc9efa403f320eeb814 /framework/Data/TDbCommand.php
parentbf8caefce718cc38ccfd121d9cd718f42021b2b9 (diff)
Allow TDbConnection and TDbCommand to be serialized.
Diffstat (limited to 'framework/Data/TDbCommand.php')
-rw-r--r--framework/Data/TDbCommand.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php
index 98bb31ea..a84ef39c 100644
--- a/framework/Data/TDbCommand.php
+++ b/framework/Data/TDbCommand.php
@@ -54,6 +54,15 @@ class TDbCommand extends TComponent
}
/**
+ * Set the statement to null when serializing.
+ */
+ public function __sleep()
+ {
+ $this->_statement=null;
+ return array_keys(get_object_vars($this));
+ }
+
+ /**
* @return string the SQL statement to be executed
*/
public function getText()
@@ -193,6 +202,7 @@ class TDbCommand extends TComponent
*/
public function query()
{
+// Prado::debug();
try
{
if($this->_statement instanceof PDOStatement)