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 +++++----------- user_guide/database/index.html | 1 + user_guide/database/table_data.html | 6 ++++-- user_guide/database/utilities.html | 32 ++++---------------------------- 4 files changed, 14 insertions(+), 41 deletions(-) (limited to 'user_guide') 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.

diff --git a/user_guide/database/index.html b/user_guide/database/index.html index 78f90478f..3af6edee8 100644 --- a/user_guide/database/index.html +++ b/user_guide/database/index.html @@ -76,6 +76,7 @@ structures and Active Record patterns. The database functions offer clear, simpl
  • Query Helper Functions
  • Active Record Class
  • Transactions
  • +
  • Table MetaData
  • Field MetaData
  • Custom Function Calls
  • Database Utilities Class
  • diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html index f3df176ed..299e6dc3e 100644 --- a/user_guide/database/table_data.html +++ b/user_guide/database/table_data.html @@ -62,15 +62,17 @@ Table Data
    + +

    Table Data

    These functions let you fetch table information.

    -

    $this->db->tables();

    +

    $this->db->list_tables();

    Returns an array containing the names of all the tables in the database you are currently connected to. Example:

    -$tables = $this->db->tables()
    +$tables = $this->db->list_tables()

    foreach ($tables as $table)
    {
    diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index b064c7983..2cc3f5219 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -119,34 +119,6 @@ foreach($dbs as $db)
    -

    $this->dbutil->list_tables();

    - -

    Returns an array containing the names of all the tables in the database you are currently connected to. Example:

    - -$tables = $this->dbutil->list_tables()
    -
    -foreach ($tables as $table)
    -{
    -    echo $table;
    -} -
    - - -

    $this->dbutil->table_exists();

    - -

    Sometimes it's helpful to know whether a particular table exists before running an operation on it. -Returns a boolean TRUE/FALSE. Usage example:

    - - -if ($this->dbutil->table_exists('table_name'))
    -{
    -    // some code...
    -} -
    - -

    Note: Replace table_name with the name of the table you are looking for.

    - -

    $this->dbutil->optimize_table('table_name');

    Permits you to optimize a table using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:

    @@ -245,6 +217,10 @@ echo $this->dbutil->cvs_from_result($query, $config); If you need to write the file use the File Helper.

    +

    $this->dbutil->export()

    + +

    Permits you to export your database or any desired tables. Export data can be downloaded to your desktop, archived to your +server, or simply displayed. Archived files can be compressed. -- cgit v1.2.3-24-g4f1b