From b2ab51b432e4de4aeb551ca17cba323ad729f406 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 24 Sep 2006 18:03:40 +0000 Subject: Deleting database folder --- user_guide/libraries/database/fields.html | 144 ------------------------------ 1 file changed, 144 deletions(-) delete mode 100644 user_guide/libraries/database/fields.html (limited to 'user_guide/libraries/database/fields.html') diff --git a/user_guide/libraries/database/fields.html b/user_guide/libraries/database/fields.html deleted file mode 100644 index baee4efae..000000000 --- a/user_guide/libraries/database/fields.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - -Code Igniter User Guide - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

Code Igniter User Guide Version 1.4.1

-
- - - - - - - - -
- - - -
- - - -
- - -

Field Data

- - -

Retrieving Field Names

-

Sometimes it's helpful to gather the field names.

- -

$this->db->field_names();

-

Returns an array containing the field names. You must supply the table name to the function:

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

- -foreach ($fields as $field)
-{
-   echo $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.

- -

Note: Not all databases provide meta-data.

- -

Usage example:

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

- -foreach ($fields as $field)
-{
-   echo $field->name;
-   echo $field->type;
-   echo $field->max_length;
-   echo $field->primary_key;
-} -
- -

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(); -
- - -

The following data is available from this function if supported by your database:

- - - - - - - -
- - - - - - - \ No newline at end of file -- cgit v1.2.3-24-g4f1b