ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:column_attributes

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
v5:dictionary:column_attributes [2016/04/03 01:28] – [UNSIGNED] mnewnhamv5:dictionary:column_attributes [2022/09/02 04:11] (current) – [Column Name] backticks mnewnham
Line 2: Line 2:
 ====== Description ====== ====== Description ======
 When creating a column in a table using the dictionary methods, the information provided must confirm to the following specification. Each column created has a number of mandatory and optional parameters. When creating a column in a table using the dictionary methods, the information provided must confirm to the following specification. Each column created has a number of mandatory and optional parameters.
--------------------------------- +
-<WRAP right info 300px> +
-$fields is a string, not an array +
-</WRAP>+
 ====== Basic Syntax ====== ====== Basic Syntax ======
 The basic syntax of the attributes is as follows:  The basic syntax of the attributes is as follows: 
Line 41: Line 38:
 =======  Attributes ===== =======  Attributes =====
 ===== Column Name ===== ===== Column Name =====
-  * The column name must conform to any database specific standards related to naming and length. +  * The column name must conform to any database specific standards related to naming and length. If the name contains spaces, then it should be surrounded by backticks '' `col with spaces` ''. Note that this is an internal designator, and does not represent the character used by the database in SQL statements.                                                          
- +
 ===== Meta Attributes ===== ===== Meta Attributes =====
   * The column attributes in terms of type and length **must** be specified in terms of ADODb [[v5:dictionary:metatype|metaType]] descriptions, not the database definition for the type.   * The column attributes in terms of type and length **must** be specified in terms of ADODb [[v5:dictionary:metatype|metaType]] descriptions, not the database definition for the type.
Line 60: Line 56:
 </WRAP> </WRAP>
 ==== CONSTRAINT ==== ==== CONSTRAINT ====
 +Adds a constraint to column. The syntax for the constraint must be defined as required by the database.
 -------------------------- --------------------------
 <WRAP right box 150px> <WRAP right box 150px>
Line 84: Line 80:
 </WRAP> </WRAP>
 ==== ENUM ==== ==== ENUM ====
-In databases that support the ENUM datatype, append a parenthesized, quoted list of enum values +In databases that support the //**ENUM**// datatype, append a parenthesized, quoted list of enum values 
   ENUM('lions','tigers','halibut')   ENUM('lions','tigers','halibut')
      
v5/dictionary/column_attributes.1459639690.txt.gz · Last modified: 2017/04/21 11:28 (external edit)