addPrimaryKey() public method
Builds and executes a SQL statement for creating a primary key.
The method will properly quote the table and column names.
public void addPrimaryKey ( $name, $table, $columns ) | ||
---|---|---|
$name | string |
The name of the primary key constraint. |
$table | string |
The table that the primary key constraint will be added to. |
$columns | string|array |
Comma separated string or array of columns that the primary key will consist of. |
Please login to continue.