Skip to content
Snippets Groups Projects
Commit 2ff9677c authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: sqlite compatibility for emptyiing tables

parent c49ee4d3
Branches
No related tags found
No related merge requests found
......@@ -118,7 +118,13 @@ class Helper {
return false;
}
$query = \OCP\DB::prepare('TRUNCATE '.$table);
if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false) {
$query = \OCP\DB::prepare('DELETE FROM '.$table);
} else {
$query = \OCP\DB::prepare('TRUNCATE '.$table);
}
$res = $query->execute();
if(\OCP\DB::isError($res)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment