$this->initconnection(); $konek = mysql_connect($this->hostname,$this->username,$this->password) or die (mysql_error()); mysql_select_db($this->database,$konek); $data=mysql_query($sql) or die (mysql_error()); mysql_close($konek); return $data; }
public function execsql($sql){
$this->initconnection(); $konek = mysql_connect($this->hostname,$this->username,$this->password) or die (mysql_error()); mysql_select_db($this->database,$konek); $data=mysql_query($sql) or die (mysql_error()); mysql_close($konek); } }