Database Abstraction Layer for PHP

User Tools

Site Tools


This is an old revision of the document!


From Version 5.21.0-beta-2

See Also

Structured Schema Management
Column Attributes Reference

obj addColumnObjectAttribute(
    string $columnName,
    string $columnType,
    optional string $platform='',


The method addColumnObject() is part of the Structured Schema Management suite, and adds a column to the current table object.



The attribute can be provided as a string, a numeric or associative array, and can describe any parameter understood by the DBMS. For example, it might be necessary to add an option to tell the DBMS what type of database engine to use.


The column type is declared using a metaType definition.


The platform parameter can be any parameter recognized by the Platform keyword.


In the following example, a table employees is to be created. The table has 2 columns, COL1 and COL2

$t = new metaObjectStructure($dict,'employees');
v5/dictionary/structure/addcolumnobject.1460220528.txt.gz · Last modified: 2017/04/21 11:29 (external edit)