We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4b060d commit 09f36dfCopy full SHA for 09f36df
MysqliDb.php
@@ -607,7 +607,11 @@ public function delete($tableName, $numRows = null)
607
if ($this->isSubQuery)
608
return;
609
610
- $this->_query = "DELETE FROM " . self::$prefix . $tableName;
+ $table = self::$prefix . $tableName;
611
+ if (count ($this->_join))
612
+ $this->_query = "DELETE " . preg_replace ('/.* (.*)/', '$1', $table) . " FROM " . $table;
613
+ else
614
+ $this->_query = "DELETE FROM " . $table;
615
616
$stmt = $this->_buildQuery($numRows);
617
$stmt->execute();
0 commit comments