Umil.table exists

From phpBB Development Wiki

umil::table_exists –– Check if a database table exists using the Umil Library.

Contents

Description

string umil::table_exists ( string $table_name )

Parameters

Parameter Required/Default Usage
table_name Required The name of the database table to search for. 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_

Return Values

True if the database table exists
False if the database table does not exist

Examples

Example #1

Check if a database table named 'phpbb_test' exists

$umil->table_exists('phpbb_test');

Example #2

Check if a database table named 'phpbb_users' exists

$umil->table_exists(USERS_TABLE);

See Also