describe Back | Forward | Home

'Language Reference'

User Functions

Database Functions

Data Manipulation Functions

Table Functions
  • showtables

  • createtable

  • droptable

  • altertable

  • describe

  • table_count

  • empty_cache

  • table_exists

  • last_insert_id


  • Error Handling Functions

    << Last Section ( altertable ) describe Next Section ( table_count ) >>
    Usage mixed describe ( array ('table' => $table [, 'db' => $db]) )
    Purpose To get information about a table
    Availability txtSQL >= 2.2.2 RC2

    This function will return information about a txtSQL $table. It will return information such as column type, permanent, maximum length etc., and will also return the enum values if the column is set to type 'enum'.

    Important- To achieve the same results as this function before txtSQL 2.2.2 RC2, use the execute() function
    Note- For more information on data types, see the data types section, or for more information the column types, see the column types section
    Note- If $tablename does not already exists, txtSQL will issue an error
    Note- If no $db is specified and no database is already selected, txtSQL will issue an error

    Example 26: describe() Copy to Clipboard
    <?php
    $tableInformation
    =
    $sql->describe(array('db'    => 'testDB',
                         
    'table' => 'testTable'));

    print_r($tableInformation);
    ?>

    User-Contributed Comments for:
    describe()
    No comments found;