Unclassified NewsBoard Code Reference

IDatabase.AddField function

Add a field (column) to a table

function IDatabase.AddField ($table, $name, $type, $where = '');

Parameters:

type
(string) column data type: "bool", "int[(length)] [unsigned]",
"varchar(length) [binary]", "text" (MySQL Doc: 6.2)
where  –  optional, default: ''
position to insert the new column
(int) 0: before first column
(string) col name: insert new column after column named $where
(default) add column at the end
table
name

Member of class: IDatabase

Implementation file: unb_lib/database.lib.php, line 301

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.