Updated SQL File to remove dummy data.
This commit is contained in:
21
db.php
Normal file
21
db.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$host = '192.168.0.201';
|
||||
$db = 'tinytask';
|
||||
$user = 'tinytask'; // change this if needed
|
||||
$pass = 'GD3AVEZRNnE@A3P]'; // change this if needed
|
||||
$charset = 'utf8mb4';
|
||||
|
||||
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
|
||||
$options = [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
];
|
||||
|
||||
try {
|
||||
$pdo = new PDO($dsn, $user, $pass, $options);
|
||||
} catch (\PDOException $e) {
|
||||
http_response_code(500);
|
||||
echo "Database error: " . $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user