Db::checkTable
Usage
bool Db::checkTable(string $table_name)Description
Check whether or not a database table exists.Parameters
Parameter | Required | Type | Description |
---|---|---|---|
$table_name | Yes | string | Name of the database to check whether or not it exists. |
Return Value
Boolean as to whether or not the table name exists within the database.Examples
Check Table
$table_name = 'some_table';
if (!$this->db->checkTable($table_name)) {
die("The table does not exist, $table_name");
}