diff --git a/sys/db/query_builder.php b/sys/db/query_builder.php
index 9eaaa31..5d82a16 100644
--- a/sys/db/query_builder.php
+++ b/sys/db/query_builder.php
@@ -1063,7 +1063,7 @@ class Query_Builder {
break;
}
- echo $sql.'
';
+ // echo $sql.'
';
return $sql;
}
diff --git a/tests/parent.php b/tests/parent.php
index 792d129..9d1bf5c 100644
--- a/tests/parent.php
+++ b/tests/parent.php
@@ -12,8 +12,6 @@
// --------------------------------------------------------------------------
-// --------------------------------------------------------------------------
-
/**
* Parent Database Test Class
*/
@@ -23,17 +21,21 @@ abstract class DBTest extends UnitTestCase {
function tearDown()
{
- unset($this->db);
+ $this->db = NULL;
}
function TestGetTables()
{
+ if (empty($this->db)) return;
+
$tables = $this->db->get_tables();
$this->assertTrue(is_array($tables));
}
function TestGetSystemTables()
{
+ if (empty($this->db)) return;
+
$tables = $this->db->get_system_tables();
$this->assertTrue(is_array($tables));
@@ -41,12 +43,16 @@ abstract class DBTest extends UnitTestCase {
function TestCreateTransaction()
{
+ if (empty($this->db)) return;
+
$res = $this->db->beginTransaction();
$this->assertTrue($res);
}
function TestPreparedStatements()
{
+ if (empty($this->db)) return;
+
$sql = <<db)) return;
+
$sql = <<db)) return;
+
$res = $this->db->beginTransaction();
$sql = 'INSERT INTO "create_test" ("id", "key", "val") VALUES (10, 12, 14)';
@@ -82,6 +92,8 @@ SQL;
function TestRollbackTransaction()
{
+ if (empty($this->db)) return;
+
$res = $this->db->beginTransaction();
$sql = 'INSERT INTO "create_test" ("id", "key", "val") VALUES (182, 96, 43)';