mirror of
https://github.com/friendica/friendica
synced 2025-04-27 04:30:11 +00:00
Issue 8550: Check for a good table_definition cache value
This commit is contained in:
parent
4991fa4e27
commit
6487daa4a9
3 changed files with 36 additions and 0 deletions
|
@ -1645,6 +1645,21 @@ class Database
|
|||
return (["list" => $statelist, "amount" => $processes]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a database variable
|
||||
*
|
||||
* @param string $name
|
||||
* @return string content
|
||||
*/
|
||||
public function getVariable(string $name)
|
||||
{
|
||||
$result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name);
|
||||
if (!isset($result['Value'])) {
|
||||
return null;
|
||||
}
|
||||
return $result['Value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if $array is a filled array with at least one entry.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue