ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:createtablesql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dictionary:createtablesql [2015/08/26 00:51] mnewnhamv5:dictionary:createtablesql [2016/01/13 02:06] – ↷ Page moved from dictionary:createtablesql to v5:dictionary:createtablesql mnewnham
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[dictionary:addcolumnsql|addColumnSql()]]+ 
 +[[dictionary:column_attributes|Column Attributes Reference]]  
 + 
 +[[dictionary:executesqlarray|executeSqlArray()]]
  
 == Syntax == == Syntax ==
Line 18: Line 21:
 ==== $tableName ===== ==== $tableName =====
 The table name must not yet exist in the database. Names must conform to any database specific requirements such as length limitations and name casing. The table name must not yet exist in the database. Names must conform to any database specific requirements such as length limitations and name casing.
 +---------
 +<WRAP right tip 200px>
 +$fields is a string, not an array
 +</WRAP>
 ==== $fields ==== ==== $fields ====
 A string holding information regarding the columns to create in the new table. For a detailed description of the format of this string, see [[dictionary:addcolumnsql|addColumnSql()]]. A string holding information regarding the columns to create in the new table. For a detailed description of the format of this string, see [[dictionary:addcolumnsql|addColumnSql()]].
Line 42: Line 49:
 */ */
 $sqlarray = $dict->createTableSQL($tabname, $flds); $sqlarray = $dict->createTableSQL($tabname, $flds);
 +
 +/*
 + * This returns (for DB2)
 +Array
 +(
 +    [0] => CREATE TABLE UCTABLE (
 +           COL1         VARCHAR(32) DEFAULT 'abc' NOT NULL,
 +           COL2         INTEGER DEFAULT 0,
 +           COL3         DECIMAL(12,2)
 +           )
 +)
 +*/
 +
  
 /* /*
v5/dictionary/createtablesql.txt · Last modified: 2016/03/05 01:55 by mnewnham