From 194b894c33eb812f84862b53691eb5de304455bb Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 4 Oct 2006 07:59:32 +0000 Subject: --- system/database/DB_cache.php | 76 ----------------------------------------- user_guide/database/fields.html | 16 ++++----- 2 files changed, 8 insertions(+), 84 deletions(-) delete mode 100644 system/database/DB_cache.php diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php deleted file mode 100644 index 4721f32c3..000000000 --- a/system/database/DB_cache.php +++ /dev/null @@ -1,76 +0,0 @@ - \ No newline at end of file diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index 83abe6327..f3ba357d5 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -65,14 +65,14 @@ Field Names

Field Data

-

$this->db->list_fields();

+

$this->db->list_fields()

Returns an array containing the field names. This query can be called two ways:

1. You can supply the table name and call it from the $this->db-> object:

-$fields = $this->db->list_fields('table_name');

+$fields = $this->db->list_fields('table_name')

foreach ($fields as $field)
{
@@ -84,7 +84,7 @@ foreach ($fields as $field)
from your query result object:

-$query = $this->db->query('SELECT * FROM some_table'); +$query = $this->db->query('SELECT * FROM some_table')

foreach ($query->list_fields() as $field)
@@ -94,7 +94,7 @@ foreach ($query->list_fields() as $field)
-

$this->db->field_exists();

+

$this->db->field_exists()

Sometimes it's helpful to know whether a particular field exists befor performing an action. Returns a boolean TRUE/FALSE. Usage example:

@@ -112,7 +112,7 @@ if ($this->db->field_exists('field_name', 'table_name'))
-

$this->db->field_data();

+

$this->db->field_data()

Returns an array of objects containing field information.

Sometimes it's helpful to gather the field names or other metadata, like the column type, max length, etc.

@@ -122,7 +122,7 @@ if ($this->db->field_exists('field_name', 'table_name'))

Usage example:

-$fields = $this->db->field_data('table_name');

+$fields = $this->db->field_data('table_name')

foreach ($fields as $field)
{
@@ -136,8 +136,8 @@ foreach ($fields as $field)

If you have run a query already you can use the result oject instead of supplying the table name:

-$query = $this->db->query("YOUR QUERY");
-$fields = $query->field_data(); +$query = $this->db->query("YOUR QUERY")
+$fields = $query->field_data()
-- cgit v1.2.3-24-g4f1b