CreateTable - ratajs/Simon-MySQL GitHub Wiki
This method creates table.
Syntax:
$object->createTable(string $table, array $names, array $types, array $lenghts[, string $primary = NULL[, array $uniques = array()[, array $others = array()]]])
- Object
- - Object of extension.
- Table
- - Table name.
- Names
- - Array of column names.
- Types
- - Array of column types (int or bigint for number, varchar for text…).
- Lengths
- - Array of maxlenghts, in case of INT type, value can be empty.
- Primary
- - Name of column, which will have PRIMARY key.
- Uniques
- - Array of column names, which will have UNIQUE key.
- Others
- - Array of additional parameters of columns, E. G. A_I.