mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
due to popular demand... this may be quite useful for automatic installer and modifications
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9495 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2547ca9635
commit
dd80961b11
1 changed files with 22 additions and 0 deletions
|
@ -313,6 +313,28 @@ class phpbb_db_tools
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if table exists
|
||||
*
|
||||
*
|
||||
* @param string $table_name The table name to check for
|
||||
* @return bool true if table exists, else false
|
||||
*/
|
||||
function sql_table_exists($table_name)
|
||||
{
|
||||
$this->db->sql_return_on_error(true);
|
||||
$result = $this->db->sql_query_limit('SELECT * FROM ' . $table_name, 1);
|
||||
$this->db->sql_return_on_error(false);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create SQL Table
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue