-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.class.php
More file actions
executable file
·41 lines (35 loc) · 936 Bytes
/
Copy pathdb.class.php
File metadata and controls
executable file
·41 lines (35 loc) · 936 Bytes
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
40
41
<?php
/**
* Created by IntelliJ IDEA.
* User: lucas
* Date: 25/11/14
* Time: 01:53
*/
require_once ("../config/cfChavesIM.php");
class Db {
private $user = "root"; // root
private $pass = "123"; // servidor
private $host = "localhost"; // em que maquina esta o BD
private $database = "mydb"; // nome do BD
function __construct(){
// parent::__construct();
print "construtor db\n";
echo "desgraça";
}
/* private function Connect() {
$conn = new PDO("mysql:host=$this->host;dbname=$this->database",
$this->user, $this->pass);
return $conn;
}
public function RunQuery($sql) {
$stm = $this->Connect()->prepare($sql);
return $stm->execute();
}
public function RunSelect($sql) {
$stm = $this->Connect()->prepare($sql);
$stm->execute();
return $stm->fetchAll(PDO::FETCH_ASSOC);
}
*/
}
?>