sample database connection helper

This commit is contained in:
Göran Heinemann 2021-05-12 15:30:26 +02:00
commit 106ca96b9a
Signed by: goeranh
GPG Key ID: D9EC7BA4C5BF1EEC
1 changed files with 12 additions and 0 deletions

12
config/db.sample.php Normal file
View File

@ -0,0 +1,12 @@
<?php
class DBHelper
{
private $servername = '';
private $username = '';
private $password = '';
public function getDBConnection()
{
$pdo = new PDO("mysql:host=$this->servername;dbname=myDB", $this->username, $this->password);
}
}