Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MySQL
- {
- private $host,
- $user,
- $pass,
- $db;
- public function __construct($host, $user, $pass, $db)
- {
- $this->host = $host;
- $this->user = $user;
- $this->pass = $pass;
- $this->db = $db;
- }
- public function connect()
- {
- mysql_connect($this->host, $this->user, $this->db)
- or die(mysql_error());
- mysql_select_db($this->db)
- or die(mysql_error());
- }
- public function close()
- {
- mysql_close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement