Fix sqlite tests

This commit is contained in:
Timothy Warren 2014-04-08 15:19:47 -04:00
parent b40b085ae5
commit d87de2ba47
1 changed files with 4 additions and 2 deletions

View File

@ -34,11 +34,13 @@ class SQLite_Util extends Abstract_Util {
public function backup_data($excluded=array()) public function backup_data($excluded=array())
{ {
// Get a list of all the objects // Get a list of all the objects
$sql = 'SELECT "name" FROM "sqlite_master"'; $sql = 'SELECT DISTINCT "name"
FROM "sqlite_master"
WHERE "type"=\'table\'';
if( ! empty($excluded)) if( ! empty($excluded))
{ {
$sql .= " WHERE \"name\" NOT IN('".implode("','", $excluded)."')"; $sql .= " AND \"name\" NOT IN('".implode("','", $excluded)."')";
} }
$res = $this->query($sql); $res = $this->query($sql);