Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* IRC channel spy by nano */
- class MySql($host="localhost", $database=NULL, $user=NULL, $pass=NULL, $port=3306) {
- function __construct() {
- $this->host = $host;
- $this->database = $database;
- $this->user = $user;
- $this->pass = $pass;
- private $this->linkId;
- public $this->errors[];
- }
- function connectToDb() {
- if ($this->linkId = mysql_connect($this->host, $this->user, $this->pass) {
- if (mysql_select_db($this->database) {
- return true;
- } else {
- $this->errors[] = mysql_error();
- }
- } else {
- $this->errors[] = mysql_error();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement