Add current project
This commit is contained in:
parent
61df06fa4e
commit
44f29bf758
15 changed files with 2688 additions and 1 deletions
13
dbTools.php
Normal file
13
dbTools.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
function buildPDO() {
|
||||
include_once "info.php";
|
||||
|
||||
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
|
||||
$opt = [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
];
|
||||
return new PDO($dsn, $user, $pass, $opt);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue