mirror of
https://github.com/friendica/friendica
synced 2025-04-26 16:30:12 +00:00
We already have got a function to check if a table exists
This commit is contained in:
parent
8b2c51baf2
commit
ec3290da3b
3 changed files with 3 additions and 26 deletions
|
@ -1660,18 +1660,6 @@ class Database
|
|||
return (["list" => $statelist, "amount" => $processes]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the given table exists
|
||||
*
|
||||
* @param string $table
|
||||
* @return bool
|
||||
*/
|
||||
public function tableExists(string $table)
|
||||
{
|
||||
return $this->exists(['information_schema' => 'tables'],
|
||||
['table_name' => $table, 'table_schema' => $this->databaseName()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a database variable
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue