CI_DB_forge::add_key()

add_key($key[, $primary = FALSE])

Parameters:
  • $key (array) – Name of a key field
  • $primary (bool) – Set to TRUE if it should be a primary key or a regular one
Returns:

CI_DB_forge instance (method chaining)

Return type:

CI_DB_forge

Adds a key to the set that will be used to create a table. Usage: See Adding Keys.

doc_CodeIgniter
2016-10-15 16:31:10
Comments
Leave a Comment

Please login to continue.