LDAP: sqlite compatibility for emptyiing tables

remotes/origin/stable6
Arthur Schiwon 12 years ago
parent c49ee4d3e3
commit 2ff9677cd1
  1. 8
      apps/user_ldap/lib/helper.php

@ -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)) {

Loading…
Cancel
Save