Fixed DELETE handling, fixes #236
This commit is contained in:
parent
57fee96923
commit
7556bfcb71
@ -445,10 +445,19 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
|
|||||||
public function isLimitSubqueryUsed() {
|
public function isLimitSubqueryUsed() {
|
||||||
return $this->limitSubqueryUsed;
|
return $this->limitSubqueryUsed;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* getQueryBase
|
||||||
|
* returns the base of the generated sql query
|
||||||
|
* On mysql driver special strategy has to be used for DELETE statements
|
||||||
|
*
|
||||||
|
* @return string the base of the generated sql query
|
||||||
|
*/
|
||||||
public function getQueryBase() {
|
public function getQueryBase() {
|
||||||
switch($this->type) {
|
switch($this->type) {
|
||||||
case self::DELETE:
|
case self::DELETE:
|
||||||
|
if($this->conn->getName() == 'mysql')
|
||||||
|
$q = 'DELETE '.end($this->tableAliases).' FROM ';
|
||||||
|
else
|
||||||
$q = 'DELETE FROM ';
|
$q = 'DELETE FROM ';
|
||||||
break;
|
break;
|
||||||
case self::UPDATE:
|
case self::UPDATE:
|
||||||
|
Loading…
Reference in New Issue
Block a user