daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest May 31st, 2017 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MySQL
  2. {
  3.     private $host,
  4.             $user,
  5.             $pass,
  6.             $db;
  7.            
  8.     public function __construct($host, $user, $pass, $db)
  9.     {
  10.         $this->host = $host;
  11.         $this->user = $user;
  12.         $this->pass = $pass;
  13.         $this->db = $db;
  14.     }
  15.    
  16.     public function connect()
  17.     {
  18.         mysql_connect($this->host, $this->user, $this->db)
  19.             or die(mysql_error());
  20.         mysql_select_db($this->db)
  21.             or die(mysql_error());
  22.     }
  23.    
  24.     public function close()
  25.     {
  26.         mysql_close();
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top