h = ($dbServer=="") ? $this->h : $dbServer; $this->db = ($dbName=="") ? $this->db : $dbName; $this->u = ($dbUser=="") ? $this->u : $dbUser; $this->p = ($userPassword=="") ? $this->p : $userPassword; $this->Connect(); } function Connect(){ $this->c = mysql_connect($this->h, $this->u, $this->p); if (!$this->c) { die("

à¡Ô´¢éͼԴ¾ÅÒ´

äÁèÊÒÁÒöµÔ´µèÍ°Ò¹¢éÍÁÙÅä´é

"); } mysql_select_db($this->db, $this->c); mysql_query("SET NAMES 'tis620'"); } function Disconnect(){ return mysql_close($this->c); } function Execute($query){ return mysql_query($query, $this->c); } function BeginTrans(){ $this->Execute("SET AUTOCOMMIT=0"); } function CommitTrans(){ $this->Execute("commit"); $this->Execute("SET AUTOCOMMIT=1"); } function RollbackTrans(){ $this->Execute("rollback"); $this->Execute("SET AUTOCOMMIT=1"); } } ?>