## db_create_field

bool db_create_field (string tablename, string field, string type)

Creates a field in a table.

Arguments

tablename is the name of the table that will be affected.
field is the name of new field (column).
type is the attribute of the new field.

Result

The function returns TRUE if successful or FALSE otherwise.

Example

`// Create a new field "telefon" VARCHAR(15) in mytable $result = db_create_field("mytable", "telefon", "VARCHAR(15)");`

See also

Database functions
Database support