Пример #1
0
 /**
  * set sql performance measuring (to output hidden in output)
  *
  * @access  public
  *
  * @author  patrick.kracht
  */
 public function set_sql_performance()
 {
     if (MsSql::is_active() || MySql::is_active()) {
         // append MsSql-performance-output
         if (MsSql::is_active()) {
             $ret = "\nPERFORMANCE ( MSSQL )\n";
             $tick = MsSql::get_query_count() . " QS";
             $time = MsSql::get_query_timer() . " MS";
             $ret .= " | mssql_query_count    " . self::align_right($tick) . "\n";
             $ret .= " | mssql_query_time     " . self::align_right($time) . "\n";
             self::$sql_perform .= $ret;
         }
         // append MySql-performance-output
         if (MySql::is_active()) {
             $ret = "\nPERFORMANCE ( MYSQL )\n";
             $tick = MySql::get_query_count() . " QS";
             $time = MySql::get_query_timer() . " MS";
             $ret .= " | mysql_query_count    " . self::align_right($tick) . "\n";
             $ret .= " | mysql_query_time     " . self::align_right($time) . "\n";
             self::$sql_perform .= $ret;
         }
     } else {
         return trigger_error('Bitte laden Sie eine Datenbank-Klasse vor der Ausgabe durch die Template-Klasse!');
     }
 }