diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-02-17 21:58:08 +0100 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-02-17 21:58:08 +0100 |
commit | c2b712eb5230fc247ef81b4b88de789b9dd08cb4 (patch) | |
tree | 20cd09b5e290d6f96b86036ebd2f06b3bf6dd118 /system/database/drivers/interbase/interbase_driver.php | |
parent | 7d42eb39484a784496868f4446a2d47b0c52410d (diff) |
implemented create_database, misc cleanup
Diffstat (limited to 'system/database/drivers/interbase/interbase_driver.php')
-rw-r--r-- | system/database/drivers/interbase/interbase_driver.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php index 20663d8bb..bc7365e4d 100644 --- a/system/database/drivers/interbase/interbase_driver.php +++ b/system/database/drivers/interbase/interbase_driver.php @@ -104,7 +104,7 @@ class CI_DB_interbase_driver extends CI_DB { /** * Select the database * - * @return resource + * @return bool */ public function db_select() { @@ -119,7 +119,7 @@ class CI_DB_interbase_driver extends CI_DB { * * @param string * @param string - * @return resource + * @return bool */ public function db_set_charset($charset, $collation) { @@ -332,6 +332,8 @@ class CI_DB_interbase_driver extends CI_DB { $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . ' FROM ' . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); + $query->result_array(); + if ($query->num_rows() == 0) { return 0; @@ -379,17 +381,10 @@ SQL; */ public function _list_columns($table = '') { - $sql = <<<SQL + return <<<SQL SELECT "RDB\$FIELD_NAME" FROM "RDB\$RELATION_FIELDS" - WHERE "RDB\$RELATION_NAME" NOT LIKE 'RDB$%' - AND "RDB\$RELATION_NAME" NOT LIKE 'MON$%' + WHERE "RDB\$RELATION_NAME"='{$table}'; SQL; - if($table !== '') - { - $sql .= ' AND "RDB$RELATION_NAME"='.$table; - } - - return $sql; } // -------------------------------------------------------------------- |