summaryrefslogtreecommitdiff
path: root/framework/Data/Common
diff options
context:
space:
mode:
authorxue <>2007-07-17 17:56:10 +0000
committerxue <>2007-07-17 17:56:10 +0000
commit42f0baae8fb39be2dd7a4c5c377f23c3f56fc865 (patch)
tree27bd7fab46d4ed09aba727632863a0812146d2ae /framework/Data/Common
parenta5ba85214c1d062f3726d3e2fa295539c6ccc33c (diff)
Fixed #666.
Diffstat (limited to 'framework/Data/Common')
-rw-r--r--framework/Data/Common/TDbCommandBuilder.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Data/Common/TDbCommandBuilder.php b/framework/Data/Common/TDbCommandBuilder.php
index 0d960c8d..0029b4c3 100644
--- a/framework/Data/Common/TDbCommandBuilder.php
+++ b/framework/Data/Common/TDbCommandBuilder.php
@@ -203,7 +203,9 @@ class TDbCommandBuilder extends TComponent
public function createDeleteCommand($where,$parameters=array())
{
$table = $this->getTableInfo()->getTableFullName();
- $command = $this->createCommand("DELETE FROM {$table} WHERE {$where}");
+ if (!empty($where))
+ $where = 'WHERE '.$where;
+ $command = $this->createCommand("DELETE FROM {$table} ".$where);
$this->bindArrayValues($command, $parameters);
return $command;
}