Fixed heredoc syntax errors

This commit is contained in:
Timothy Warren 2012-02-13 13:29:31 -05:00
parent 13ff38acb4
commit cfc01cb90e
2 changed files with 15 additions and 8 deletions

View File

@ -59,6 +59,7 @@ class pgSQL extends DB_PDO {
WHERE "datname" NOT IN ('template0','template1') WHERE "datname" NOT IN ('template0','template1')
ORDER BY 1 ORDER BY 1
SQL; SQL;
$res = $this->query($sql); $res = $this->query($sql);
$dbs = $res->fetchAll(PDO::FETCH_ASSOC); $dbs = $res->fetchAll(PDO::FETCH_ASSOC);
@ -118,6 +119,7 @@ SQL;
SELECT DISTINCT "schemaname" FROM "pg_tables" SELECT DISTINCT "schemaname" FROM "pg_tables"
WHERE "schemaname" NOT LIKE 'pg\_%' WHERE "schemaname" NOT LIKE 'pg\_%'
SQL; SQL;
} }
$sql = <<<SQL $sql = <<<SQL

View File

@ -42,8 +42,10 @@ class SQLite extends DB_PDO {
{ {
// SQLite has a TRUNCATE optimization, // SQLite has a TRUNCATE optimization,
// but no support for the actual command. // but no support for the actual command.
$sql = <<<SQL DELETE FROM "{$table}"" $sql = <<<SQL
DELETE FROM "{$table}"
SQL; SQL;
$this->query($sql); $this->query($sql);
} }
@ -55,8 +57,10 @@ SQL;
function get_tables() function get_tables()
{ {
$tables = array(); $tables = array();
$sql = <<<SQL SELECT "name", "sql" FROM "sqlite_master" WHERE type='table' $sql = <<<SQL
SELECT "name", "sql" FROM "sqlite_master" WHERE "type"='table'
SQL; SQL;
$res = $this->query($sql); $res = $this->query($sql);
$result = $res->fetchAll(PDO::FETCH_ASSOC); $result = $res->fetchAll(PDO::FETCH_ASSOC);
@ -109,7 +113,8 @@ SQL;
*/ */
function unload_database($name) function unload_database($name)
{ {
$sql = <<< SQL DETACH DATABASE "{$name}"" $sql = <<<SQL
DETACH DATABASE "{$name}"
SQL; SQL;
$this->query($sql); $this->query($sql);
} }