summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/interbase/interbase_driver.php27
-rw-r--r--system/database/drivers/interbase/interbase_forge.php13
2 files changed, 14 insertions, 26 deletions
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php
index a011f103d..36ef42ef3 100644
--- a/system/database/drivers/interbase/interbase_driver.php
+++ b/system/database/drivers/interbase/interbase_driver.php
@@ -152,7 +152,7 @@ class CI_DB_interbase_driver extends CI_DB {
*/
public function db_set_charset($charset, $collation)
{
- // @todo - add support if needed
+ // Must be determined at connection
return TRUE;
}
@@ -166,8 +166,13 @@ class CI_DB_interbase_driver extends CI_DB {
*/
public function _version()
{
- //@todo - add support if needed
- return TRUE;
+ if (($service = ibase_service_attach($this->hostname, $this->username, $this->password)))
+ {
+ $version = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
+ return $version;
+ }
+
+ return FALSE;
}
// --------------------------------------------------------------------
@@ -396,7 +401,7 @@ SQL;
if ($prefix_limit !== FALSE AND $this->dbprefix != '')
{
- $sql .= " AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
+ $sql .= ' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
}
return $sql;
}
@@ -620,7 +625,7 @@ SQL;
$conditions .= implode("\n", $like);
}
- $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
+ //$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -640,16 +645,8 @@ SQL;
*/
public function _limit($sql, $limit, $offset)
{
- if ($offset == 0)
- {
- $offset = '';
- }
- else
- {
- $offset .= ", ";
- }
-
- return $sql."LIMIT ".$offset.$limit;
+ //There doesn't seem to be a limit clause?
+ return $sql;
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/interbase/interbase_forge.php b/system/database/drivers/interbase/interbase_forge.php
index 815107d85..177433fc4 100644
--- a/system/database/drivers/interbase/interbase_forge.php
+++ b/system/database/drivers/interbase/interbase_forge.php
@@ -205,20 +205,11 @@ class CI_DB_interbase_forge extends CI_DB_forge {
{
$sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name);
- // DROP has everything it needs now.
- /*if ($alter_type == 'DROP')
- {
- // SQLite does not support dropping columns
- // http://www.sqlite.org/omitted.html
- // http://www.sqlite.org/faq.html#q11
- return FALSE;
- }*/
-
- $sql .= " $column_definition";
+ $sql .= " {$column_definition}";
if ($default_value != '')
{
- $sql .= " DEFAULT \"$default_value\"";
+ $sql .= " DEFAULT \"{$default_value}\"";
}
if ($null === NULL)