[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_column

Overview

Find information about columns of tables in the database

Syntax

ns_column count dbhandle table

ns_column exists dbhandle table column

ns_column name dbhandle table colindex

ns_column type dbhandle table column

ns_column typebyindex dbhandle table colindex

ns_column value dbhandle table column key

ns_column valuebyindex dbhandle table colindex key

Description

Each of these functions requires a database handle for the dbhandle argument and a table name for the table argument. Use ns_db gethandle to get a database handle.

ns_column count returns the number of columns in the specified table.

ns_column exists returns 1 (one) if the specified column exists in the specified table and 0 (zero) if it does not.

ns_column name returns the name of the column specified by the column index (colindex) in the specified table.

ns_column type returns the type of the specified column (e.g., integer, varchar).

ns_column typebyindex returns the type of the column specified by the column index (colindex).

ns_column value returns the value of the column attribute specified by key. You can use this function to access table customization data like a column description or default value. For example:

    [ns_column value $db $table $column description]

ns_column valuebyindex returns the value of the column attribute specified by key. This function is the same as ns_column value except that the column is specified by the column index (colindex).

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.