/
home2
/
ajwaeing
/
public_html
/
Upload File
HOME
<?php class dbConnection { private $host = "localhost"; private $user = "ajwaeing_ajwa"; private $pwd = 'MMvzpY%9QFMx-X3kvd'; private $database = "ajwaeing_ajwa"; private $link; private $result; private $sql; private $conn; function __construct() { $this->conn = mysqli_connect($this->host, $this->user, $this->pwd, $this->database); return $this->link; } function query($sql) { if(!empty($sql)) { global $mysql; $this->sql = $sql; $mysql = mysqli_query($this->conn, $this->sql); return $mysql; } else { return false; } } function rows($res) { return mysqli_num_rows($res); } function fetch($res) { return mysqli_fetch_array($res); } function fetchobj($res) { return mysqli_fetch_object($res); } function effected($res) { return mysqli_affected_rows($res); } function clean($data) { return mysqli_real_escape_string($this->conn, $data); } function getid() { return mysqli_insert_id($this -> conn); } /*function __destruct() { mysql_close($this->link); }*/ } ?>