Dear Techie's
This is my database connection class. this class connecting mysql database. this class is very easily built and everyone can understand easily. so am not going to explain about db connection class.
This is my database connection class. this class connecting mysql database. this class is very easily built and everyone can understand easily. so am not going to explain about db connection class.
conn) {
$conn = @mysql_connect($this->db_host, $this->db_user, $this->db_password) or die("Could Not Possible To Connect a Server" . mysql_error());
if ($conn) {
$seldb = @mysql_select_db($this->db_name, $conn) or die("Could not Possible To Connect A Database" . mysql_error());
if ($seldb) {
return $this->conn;
} else {
return false;
}
} else {
return false;
}
}
return $this->conn;
}
/* Close/Disconnect DB connection*/
public function disconnect($dbconnected) {
$disc = mysql_close($dbconnected);
if ($disc) {
return true;
} else {
return false;
}
}
}







0 comments:
Post a Comment