File updates
This commit is contained in:
parent
c3f882960c
commit
437d81838a
|
@ -3,7 +3,7 @@ class Application
|
|||
{
|
||||
private $database = [];
|
||||
|
||||
private $db;
|
||||
private static $db;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -22,15 +22,17 @@ class Application
|
|||
$username = $this->database['username'];
|
||||
$password = $this->database['password'];
|
||||
|
||||
$this->db = \ParagonIE\EasyDB\Factory::create($dsn, $username, $password);
|
||||
$instance = \ParagonIE\EasyDB\Factory::create($dsn, $username, $password);
|
||||
|
||||
self::$db = $instance;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function Exists($Table, $IDRowColumnName, $SearchValue)
|
||||
{
|
||||
|
||||
$exists = $db->cell(
|
||||
"SELECT count(ID) FROM $Table WHERE $IDRowColumnName = ?",
|
||||
$SearhValue
|
||||
|
|
Loading…
Reference in New Issue