Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Db {
- private $dsn = 'mysql:host=localhost;dbname=loja';
- private $user='root';
- private $pass = '';
- public $db;
- public function __construct(){
- $this->db = new PDO('mysql:host=localhost;dbname=loja', 'root', '');
- }
- public function query($sql){
- return $this->db->query($sql);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement