PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
V   Language Overview
VI   Tags
VII   Variables
VIII   Functions
IX   Modules
  PTMDB
      • db_add_row()
      • db_add_row_hash()
      • db_create_database()
      • db_create_table()
      • db_connect()
      • db_disconnect()
      • db_delete_row()
      • db_delete_row_like()
      • db_delete_row_where()
      • db_drop_database()
      • db_drop_table()
      • db_get_column_count()
      • db_get_column_stats()
      • db_get_columns()
      • db_get_databases()
      • db_get_index_stats()
      • db_get_indexes()
      • db_get_process_stats()
      • db_get_row()
      • db_get_row_count()
      • db_get_row_count_like()
      • db_get_row_count_where()
      • db_get_row_hash()
      • db_get_row_hash_like()
      • db_get_row_hash_where()
      • db_get_row_hashes()
      • db_get_row_hashes_like()
      • db_get_row_hashes_where()
      • db_get_row_like()
      • db_get_row_where()
      • db_get_rows()
      • db_get_rows_like()
      • db_get_rows_where()
      • db_get_table_stats()
      • db_get_tables()
      • db_select_database()
      • db_query()
      • db_update_row()
      • db_update_row_hash()
      • db_update_row_hash_like()
      • db_update_row_hash_where()
      • db_update_row_like()
      • db_update_row_where()
  RSS20
Documentation
View / Download this file.
---------------------------------------------
PTMDB MODULE - db_get_column_stats() FUNCTION
---------------------------------------------

  ------------
  USAGE FORMAT
  ------------

    Where @stats is a returned array of array references:

    @stats = &db_get_column_stats($db_object, $table_name);
    @stats = &db_get_column_stats($db_object, $table_name, $db_name);

  -----------
  DESCRIPTION
  -----------

    Retreives column information from a given database table. If a database
    has already been selected, the only required parameters are the database
    object and a table name. If a database has not been selected, or you wish
    to list columns from a table in another database, a database name is
    required as well. Returns an array of array references, each containing one
    column's statistics.

  ---------
  ARGUMENTS
  ---------

    $db_object

      REQUIRED

      A database handler object. This object stores connection information and
      is returned from a db_connect() function call. This object is of the same
      type as is returned by a DBI->connect function call.

    $table_name

      REQUIRED

      The name of the table from which you would like to pull column
      information.

    $db_name

      OPTIONAL / REQUIRED

      The name of the database from which to pull table column data. This is
      only required if a database has not yet been selected using the
      db_select_database() function or an SQL 'USE' statement, or alternately if
      you wish to pull table column headers from a different database than the
      one currently selected.

  -------
  RETURNS
  -------

    An array of array references. Each array reference contains information
    about one column from the selected table. This information can vary
    depending on database type. See your database documentation for the
    "SHOW COLUMNS" SQL query. MySQL, for example, returns column information
    in the following order:

      Field Name, Type, Null, Key, Default, Extra

  --------
  SEE ALSO
  --------

    MODULES

      PTMDB

    FUNCTIONS

      PTMDB - db_select_database()
Home    SVN    Downloads    Documentation    Forum    Contact