fix tiny sql-query error when using APS and correct DbManager-replacers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -300,7 +300,7 @@ if ($page == 'customers'
|
||||
DELETE FROM `" . TABLE_PANEL_TASKS . "`
|
||||
WHERE `type` = '2' AND `data` LIKE :loginname"
|
||||
);
|
||||
Database::pexecute($del_stmt, array(':loginname' => "%:{$result['loginname']};%"));
|
||||
Database::pexecute($del_stmt, array('loginname' => "%:{$result['loginname']};%"));
|
||||
|
||||
// remove everything APS-related, #216
|
||||
$apsresult_stmt = Database::prepare("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id");
|
||||
@@ -315,7 +315,7 @@ if ($page == 'customers'
|
||||
Database::pexecute($del_stmt, array('iid' => $apsrow['ID']));
|
||||
}
|
||||
// now remove all user instances
|
||||
$stmt = Database::prepare("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id'");
|
||||
$stmt = Database::prepare("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id");
|
||||
Database::pexecute($stmt, array('id' => $id));
|
||||
// eventually some temp-setting-leftovers
|
||||
$stmt = Database::prepare("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID` = :id");
|
||||
|
||||
@@ -106,7 +106,7 @@ class DbManagerMySQL {
|
||||
while ($host = $host_res_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$drop_stmt = Database::prepare("DROP USER :dbname@:host");
|
||||
Database::pexecute($drop_stmt, array(':dbname' => $dbname, ':host' => $host['Host']), false);
|
||||
Database::pexecute($drop_stmt, array('dbname' => $dbname, 'host' => $host['Host']), false);
|
||||
}
|
||||
|
||||
$drop_stmt = Database::prepare("DROP DATABASE IF EXISTS `".$dbname."`");
|
||||
|
||||
Reference in New Issue
Block a user