mirror of
https://github.com/friendica/friendica
synced 2024-06-21 13:14:42 +02:00
WIP
This commit is contained in:
parent
0b6d3c71f9
commit
b4a6e068a9
|
@ -113,10 +113,9 @@ class DBA
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function databaseName() {
|
public static function databaseName()
|
||||||
$ret = self::p("SELECT DATABASE() AS `db`");
|
{
|
||||||
$data = self::toArray($ret);
|
return self::$db->getDatabaseName();
|
||||||
return $data[0]['db'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,7 +38,7 @@ interface IDatabase
|
||||||
* Returns the selected database name
|
* Returns the selected database name
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function databaseName();
|
function getDatabaseName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if data exists
|
* Check if data exists
|
||||||
|
|
|
@ -194,9 +194,15 @@ class MysqlDatabase implements IDatabase, IDatabaseLock
|
||||||
return $this->serverInfo;
|
return $this->serverInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function databaseName()
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function getDatabaseName()
|
||||||
{
|
{
|
||||||
return DBA::databaseName();
|
$ret = $this->p("SELECT DATABASE() AS `db`");
|
||||||
|
$data = $this->toArray($ret);
|
||||||
|
return $data[0]['db'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exists($table, array $condition)
|
public function exists($table, array $condition)
|
||||||
|
|
Loading…
Reference in a new issue