From 3dd978f680076be842bfcb5c9e2cbf35b926373b Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 30 Sep 2006 19:24:45 +0000 Subject: --- user_guide/database/fields.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'user_guide/database/fields.html') diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index 5c872eca9..260cd222f 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -65,17 +65,14 @@ Field Names

Field Data

-

Retrieving Field Names

-

Sometimes it's helpful to gather the field names for a particular table or with a paritcular query result.

- -

$this->db->field_names();

+

$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->field_names('table_name');

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

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

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

-foreach ($query->field_names() as $field)
+foreach ($query->list_fields() as $field)
{
   echo $field;
} @@ -98,13 +95,10 @@ foreach ($query->field_names() as $field)
- - -

Retrieving Field MetaData

-

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

-

$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.

+

Note: Not all databases provide meta-data.

-- cgit v1.2.3-24-g4f1b