sample database connection helper
This commit is contained in:
commit
106ca96b9a
12
config/db.sample.php
Normal file
12
config/db.sample.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user