From a8b3ebe8f62c3888b216d827c1c5dcba8a47d4e1 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 26 Nov 2006 22:15:58 +0000 Subject: Adding active record implementation. --- framework/Data/TDbCommand.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'framework/Data/TDbCommand.php') diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php index 91b165fa..82e46a25 100644 --- a/framework/Data/TDbCommand.php +++ b/framework/Data/TDbCommand.php @@ -155,9 +155,9 @@ class TDbCommand extends TComponent { $this->prepare(); if($dataType===null) - $this->_statement->bindParam($name,$value); + $this->_statement->bindValue($name,$value); else - $this->_statement->bindParam($name,$value,$dataType); + $this->_statement->bindValue($name,$value,$dataType); } /** @@ -177,7 +177,11 @@ class TDbCommand extends TComponent return $this->_statement->rowCount(); } else - return $this->getConnection()->getPdoInstance()->exec($this->getText()); + { + $int = $this->getConnection()->getPdoInstance()->exec($this->getText()); + var_dump($int); + return $int; + } } catch(Exception $e) { -- cgit v1.2.3