phpBB

Development Wiki

Umil.table column remove

From phpBB Development Wiki

umil::table_column_remove –– Remove a column from a database table using the Umil Library.

Description

string umil::table_column_remove ( mixed $table_name [, string $column_name ] )

Parameters

Parameter Required/Default Usage
table_name Required The name of the database table to remove the column from. You may just use phpbb_ for the table prefix if you would like. UMIL correctly sets the table prefix to the board's default if you enter in phpbb_
column_name default '' The name of the column to remove

Return Values

Returns result or umil_end data

This article is a stub. You can help in improving Olympus Documentation by expanding it.


Examples

Example #1

Remove the column named 'test_foo' from the phpbb_test table.

$umil->table_column_remove('phpbb_test''test_foo');

Example #2

Remove the column named 'test_bar' from the phpbb_users table.

$umil->table_column_remove(USERS_TABLE'test_bar');

Example #3

Removing multiple columns with one function call

$umil->table_column_remove(array(
    array(
'phpbb_test''test_foo'),
    array(
USERS_TABLE'test_bar'),
));

See Also