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')
ORDER BY 1
SQL;
$res = $this->query($sql);
$dbs = $res->fetchAll(PDO::FETCH_ASSOC);
@ -118,6 +119,7 @@ SQL;
SELECT DISTINCT "schemaname" FROM "pg_tables"
WHERE "schemaname" NOT LIKE 'pg\_%'
SQL;
}
$sql = <<<SQL

View File

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