diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-21 17:48:11 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-21 17:48:11 +0100 |
commit | df264429b7171da21524be93d38e334fadec801b (patch) | |
tree | 636361ef03551c03c150b17dd5e13c933c1b4c84 /system/database | |
parent | af6a8be88c21e80889980426792b52f7aeee01f9 (diff) |
added dbprefix to dbforge functions
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_forge.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index d4f1faeba..f8b74c089 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -180,7 +180,7 @@ class CI_DB_forge { show_error('Field information is required.');
}
- $sql = $this->_create_table($table, $this->fields, $this->primary_keys, $this->keys, $if_not_exists);
+ $sql = $this->_create_table($this->db->dbprefix.$table, $this->fields, $this->primary_keys, $this->keys, $if_not_exists);
$this->_reset();
return $this->db->query($sql);
@@ -197,7 +197,7 @@ class CI_DB_forge { */
function drop_table($table_name)
{
- $sql = $this->_drop_table($table_name);
+ $sql = $this->_drop_table($this->db->dbprefix.$table_name);
if (is_bool($sql))
{
@@ -234,7 +234,7 @@ class CI_DB_forge { show_error('Field information is required.');
}
- $sql = $this->_alter_table('ADD', $table, $this->fields, $after_field);
+ $sql = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->fields, $after_field);
$this->_reset();
return $this->db->query($sql);
@@ -263,7 +263,7 @@ class CI_DB_forge { show_error('A column name is required for that operation.');
}
- $sql = $this->_alter_table('DROP', $table, $column_name);
+ $sql = $this->_alter_table('DROP', $this->db->dbprefix.$table, $column_name);
return $this->db->query($sql);
}
@@ -296,7 +296,7 @@ class CI_DB_forge { show_error('Field information is required.');
}
- $sql = $this->_alter_table('CHANGE', $table, $this->fields);
+ $sql = $this->_alter_table('CHANGE', $this->db->dbprefix.$table, $this->fields);
$this->_reset();
return $this->db->query($sql);
|