summaryrefslogtreecommitdiff
path: root/framework/Data/TDbCommand.php
diff options
context:
space:
mode:
authorxue <>2006-11-24 19:15:26 +0000
committerxue <>2006-11-24 19:15:26 +0000
commit7280a2301a3d3dd251d8302c3f7999fa09780d42 (patch)
tree4436f61f268a79271ccf7c01fdab7a5be5c50106 /framework/Data/TDbCommand.php
parent88a073ccbb0026e52d2f83aeeaab4bd9591ef3ab (diff)
bug fixes of data layer.
Diffstat (limited to 'framework/Data/TDbCommand.php')
-rw-r--r--framework/Data/TDbCommand.php7
1 files changed, 5 insertions, 2 deletions
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)
{