Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.     class Db {
  3.         private $dsn = 'mysql:host=localhost;dbname=loja';
  4.         private $user='root';
  5.         private $pass = '';
  6.         public $db;
  7.         public function __construct(){
  8.             $this->db = new PDO('mysql:host=localhost;dbname=loja', 'root', '');    
  9.         }
  10.         public function query($sql){
  11.             return $this->db->query($sql);
  12.         }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement