----------------------------------------- PTMDB MODULE - db_create_table() FUNCTION ----------------------------------------- ------------ USAGE FORMAT ------------ Where $rv is the SQL query's return value: $rv = &db_create_table($db_object, $table_name, $type, @column_arguments); ----------- DESCRIPTION ----------- Creates a new table in the selected database using the column arguments. A database MUST be selected before calling this function. if $type is specified a "TYPE=$type" statement will be appended to the end of the CREATE TABLE statement: e.g. $type='MyISAM' - TYPE=MyISAM Returns the CREATE TABLE query's return value (0 [zero] if successful). See "CREATE TABLE" SQL reference for appropriate formatting of arguments. --------- 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 to be created. $type REQUIRED / OPTIONAL The table type, e.g. 'MyISAM' in MySQL. This field is not required, but should usually be used. If not using this field, simply assign it an empty value. @column_arguments REQUIRED The column/field descriptors to go into the CREATE TABLE SQL statement. For example, adding an item of 'id INT NOT NULL' will create a field named 'id' which is an integer and cannot be null. ------- RETURNS ------- 0 (zero) if successful. Nothing if not successful. -------- SEE ALSO -------- MODULES PTMDB FUNCTIONS PTMDB - db_drop_table()