summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-12 01:48:41 +0200
committeradmin <devnull@localhost>2006-10-12 01:48:41 +0200
commit606f99c043272f96f21911d89c21cd36c2ef59e4 (patch)
tree4f73881300630f26dbc2940a11177aceabc82878 /system/database
parent4c1ab6c826c3f5c3158a38443c2d3c30203f0f5a (diff)
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_driver.php3
-rw-r--r--system/database/DB_result.php6
-rw-r--r--system/database/drivers/mssql/mssql_result.php8
-rw-r--r--system/database/drivers/mysql/mysql_result.php8
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php8
-rw-r--r--system/database/drivers/oci8/oci8_result.php8
-rw-r--r--system/database/drivers/odbc/odbc_result.php8
-rw-r--r--system/database/drivers/postgre/postgre_result.php8
-rw-r--r--system/database/drivers/sqlite/sqlite_result.php8
9 files changed, 54 insertions, 11 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 22f91ed4c..a4131fd73 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -172,6 +172,7 @@ class CI_DB_driver {
$CI =& get_instance();
$CI->dbutil = new $class();
+ $CI->_ci_assign_to_models();
}
// --------------------------------------------------------------------
@@ -629,7 +630,7 @@ class CI_DB_driver {
*/
function primary($table = '')
{
- $fields = $this->field_names($table);
+ $fields = $this->list_fields($table);
if ( ! is_array($fields))
{
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 1c8ad6be0..b163bb5ea 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -261,14 +261,14 @@ class CI_DB_result {
*/
function num_rows() { return $this->num_rows; }
function num_fields() { return 0; }
- function field_names() { return array(); }
+ function list_fields() { return array(); }
+ function field_names() { return array(); } // Deprecated
function field_data() { return array(); }
function free_result() { return TRUE; }
function _data_seek() { return TRUE; }
function _fetch_assoc() { return array(); }
function _fetch_object() { return array(); }
-
-
+
}
// END DB_result class
?> \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index 498deae09..0ba0b8c57 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -60,7 +60,7 @@ class CI_DB_mssql_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
while ($field = mssql_fetch_field($this->result_id))
@@ -70,6 +70,12 @@ class CI_DB_mssql_result extends CI_DB_result {
return $field_names;
}
+
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php
index 3fdfc8183..1cf6ff188 100644
--- a/system/database/drivers/mysql/mysql_result.php
+++ b/system/database/drivers/mysql/mysql_result.php
@@ -60,7 +60,7 @@ class CI_DB_mysql_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
while ($field = mysql_fetch_field($this->result_id))
@@ -70,6 +70,12 @@ class CI_DB_mysql_result extends CI_DB_result {
return $field_names;
}
+
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 08db13f10..215403e9d 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -60,7 +60,7 @@ class CI_DB_mysqli_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
while ($field = mysql_fetch_field($this->result_id))
@@ -71,6 +71,12 @@ class CI_DB_mysqli_result extends CI_DB_result {
return $field_names;
}
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
+
// --------------------------------------------------------------------
/**
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index a3da80026..ab13a3935 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -84,7 +84,7 @@ class CI_DB_oci8_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
$fieldCount = $this->num_fields();
@@ -95,6 +95,12 @@ class CI_DB_oci8_result extends CI_DB_result {
return $field_names;
}
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
+
// --------------------------------------------------------------------
/**
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index 9204d8680..ea834f9b4 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -60,7 +60,7 @@ class CI_DB_odbc_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
for ($i = 0; $i < $this->num_fields(); $i++)
@@ -71,6 +71,12 @@ class CI_DB_odbc_result extends CI_DB_result {
return $field_names;
}
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
+
// --------------------------------------------------------------------
/**
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index 8c25c5d4c..e792544ae 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.php
@@ -60,7 +60,7 @@ class CI_DB_postgre_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
for ($i = 0; $i < $this->num_fields(); $i++)
@@ -71,6 +71,12 @@ class CI_DB_postgre_result extends CI_DB_result {
return $field_names;
}
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
+
// --------------------------------------------------------------------
/**
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php
index a3e94b471..55364bb24 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.php
@@ -60,7 +60,7 @@ class CI_DB_sqlite_result extends CI_DB_result {
* @access public
* @return array
*/
- function field_names()
+ function list_fields()
{
$field_names = array();
for ($i = 0; $i < $this->num_fields(); $i++)
@@ -71,6 +71,12 @@ class CI_DB_sqlite_result extends CI_DB_result {
return $field_names;
}
+ // Deprecated
+ function field_names()
+ {
+ return $this->list_fields();
+ }
+
// --------------------------------------------------------------------
/**