LDAP: sqlite compatibility for emptyiing tables
This commit is contained in:
parent
c49ee4d3e3
commit
2ff9677cd1
|
@ -118,7 +118,13 @@ class Helper {
|
||||||
return false;
|
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();
|
$res = $query->execute();
|
||||||
|
|
||||||
if(\OCP\DB::isError($res)) {
|
if(\OCP\DB::isError($res)) {
|
||||||
|
|
Loading…
Reference in New Issue