From d3d8e2e1afff7abc5d08f78f97d986e46d4e4805 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 28 Feb 2012 22:07:13 -0500 Subject: [PATCH] Minor formatting changes --- common/db_pdo.php | 2 +- databases/firebird.php | 2 +- databases/sqlite.php | 2 +- tests/databases/firebird.php | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/db_pdo.php b/common/db_pdo.php index 168eb1a..2cfb54e 100644 --- a/common/db_pdo.php +++ b/common/db_pdo.php @@ -190,7 +190,7 @@ abstract class DB_PDO extends PDO { * @return string */ abstract public function backup_structure(); - + /** * Return an SQL file with the database data as insert statements * diff --git a/databases/firebird.php b/databases/firebird.php index e8bcef3..c549b41 100644 --- a/databases/firebird.php +++ b/databases/firebird.php @@ -57,7 +57,7 @@ class firebird extends DB_PDO { public function truncate($table) { // Firebird lacka a truncate command - $sql = 'DELETE FROM '.$table.'"'; + $sql = 'DELETE FROM "'.$table.'"'; $this->query($sql); } diff --git a/databases/sqlite.php b/databases/sqlite.php index 6cf4b92..ffaeda2 100644 --- a/databases/sqlite.php +++ b/databases/sqlite.php @@ -106,7 +106,7 @@ SQL; */ public function load_database($db, $name) { - $sql = "ATTACH DATABASE '{$db}' AS \"{$name}\""; + $sql = 'ATTACH DATABASE "'.$db.'" AS "'.$name.'"'; $this->query($sql); } diff --git a/tests/databases/firebird.php b/tests/databases/firebird.php index 6d9cb5d..2ac42d4 100644 --- a/tests/databases/firebird.php +++ b/tests/databases/firebird.php @@ -72,7 +72,11 @@ class FirebirdTest extends UnitTestCase { function TestCreateTable() { //Attempt to create the table - $sql = $this->db->manip->create_table('create_test', array('id' => 'SMALLINT', 'key' => 'VARCHAR(64)', 'val' => 'BLOB SUB_TYPE TEXT')); + $sql = $this->db->manip->create_table('create_test', array( + 'id' => 'SMALLINT', + 'key' => 'VARCHAR(64)', + 'val' => 'BLOB SUB_TYPE TEXT' + )); $this->db->query($sql); //This test fails for an unknown reason, when clearly the table exists