/**
  * Query the database with the given SQL statement
  * 
  * @param string $sql
  * @return resource 
  */
 public function query($sql)
 {
     if (QUERY_LOGGING) {
         argent_logger::log_event('DB Query', $sql, 'argent_database');
     }
     $this->last_query = $sql;
     $result = mysql_query($sql, $this->connection);
     $this->confirm_query($result);
     return $result;
 }
 /**
  * Exception Handler
  * 
  * @internal
  * @static
  * @param type $exception 
  */
 public static function catch_exception($exception)
 {
     argent_logger::log_event('Exception', $exception->getMessage());
     echo "Argent Exception: " . $exception->getMessage();
 }