From 7280a2301a3d3dd251d8302c3f7999fa09780d42 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 24 Nov 2006 19:15:26 +0000 Subject: bug fixes of data layer. --- framework/Data/TDbCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'framework/Data/TDbCommand.php') diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php index 3d0e367a..df34207c 100644 --- a/framework/Data/TDbCommand.php +++ b/framework/Data/TDbCommand.php @@ -22,6 +22,9 @@ * (such as select), use {@link query} or its convenient versions {@link queryRow} * and {@link queryScalar}. * + * If an SQL statement returns results (such as a SELECT SQL), the results + * can be accessed via the returned {@link TDbDataReader}. + * * TDbCommand supports SQL statment preparation and parameter binding. * Call {@link bindParameter} to bind a PHP variable to a parameter in SQL. * Call {@link bindValue} to bind a value to an SQL parameter. @@ -79,7 +82,7 @@ class TDbCommand extends TComponent /** * @return PDOStatement the underlying PDOStatement for this command - * It could be null if the statement is not created yet. + * It could be null if the statement is not prepared yet. */ public function getPdoStatement() { @@ -99,7 +102,7 @@ class TDbCommand extends TComponent { try { - $this->_statement=$this->getConnection()->getPdoInstance()->prepare($sql); + $this->_statement=$this->getConnection()->getPdoInstance()->prepare($this->getText()); } catch(Exception $e) { -- cgit v1.2.3