handle = @mysql_connect($db_host, $db_user, $db_pass) or die("FAILED"); @mysql_select_db($db_name); } function Query($query, $store = "flush") { if ( stristr($query, "SELECT") ) { $check = TRUE; $this->res[$store] = @mysql_query($query, $this->handle); } else { $this->res[$store] = @mysql_unbuffered_query($query, $this->handle); } if ( mysql_error() ) { echo mysql_error() . "
\n"; echo $query; } if ( $check === TRUE ) { $this->num[$store] = @mysql_num_rows($this->res[$store]); } else { $this->num[$store] = @mysql_affected_rows($this->res[$store]); } } function Dc() { mysql_close($this->handle); } } ?>