summaryrefslogtreecommitdiff
path: root/framework/Data/TDbCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/TDbCommand.php')
-rw-r--r--framework/Data/TDbCommand.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php
index 9cf5b0a0..102bdf34 100644
--- a/framework/Data/TDbCommand.php
+++ b/framework/Data/TDbCommand.php
@@ -180,6 +180,7 @@ class TDbCommand extends TComponent
{
try
{
+ Prado::trace('Execute Command: '.$this->getDebugStatementText(), 'System.Data');
if($this->_statement instanceof PDOStatement)
{
$this->_statement->execute();
@@ -197,7 +198,7 @@ class TDbCommand extends TComponent
/**
* @return String prepared SQL text for debugging purposes.
*/
- protected function getDebugStatementText()
+ public function getDebugStatementText()
{
if(Prado::getApplication()->getMode() === TApplicationMode::Debug)
return $this->_statement instanceof PDOStatement ?
@@ -215,6 +216,7 @@ class TDbCommand extends TComponent
{
try
{
+ Prado::trace('Query: '.$this->getDebugStatementText(), 'System.Data');
if($this->_statement instanceof PDOStatement)
$this->_statement->execute();
else
@@ -239,6 +241,7 @@ class TDbCommand extends TComponent
{
try
{
+ Prado::trace('Query Row: '.$this->getDebugStatementText(), 'System.Data');
if($this->_statement instanceof PDOStatement)
$this->_statement->execute();
else
@@ -264,6 +267,7 @@ class TDbCommand extends TComponent
{
try
{
+ Prado::trace('Query Scalar: '.$this->getDebugStatementText(), 'System.Data');
if($this->_statement instanceof PDOStatement)
$this->_statement->execute();
else