-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_db.php
executable file
·39 lines (29 loc) · 945 Bytes
/
_db.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
global $pdo;
$dbInfo['server'] = "localhost";
$dbInfo['database'] = "capital_MAPA";
$dbInfo['username'] = "root";
$dbInfo['password'] = "root";
$con = "mysql:host=" . $dbInfo['server'] . "; dbname=" . $dbInfo['database'];
$pdo = new PDO($con, $dbInfo['username'], $dbInfo['password']);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
/*implementação-dump*/
/*
CREATE TABLE `markers` (
`ID` int(11) NOT NULL,
`mark` varchar(255) NOT NULL,
`x` varchar(255) NOT NULL,
`y` varchar(255) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`content` varchar(255) DEFAULT NULL,
`audio` varchar(255) DEFAULT NULL,
`ck` int(11) NOT NULL,
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `markers`
ADD PRIMARY KEY (`ID`);
ALTER TABLE `markers`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
*/
?>