Пример #1
0
 function query($sql, $type = '')
 {
     $func = $type == 'UNBUFFERED' && @function_exists('mysql_unbuffered_query') ? 'mysql_unbuffered_query' : 'mysql_query';
     if (!$this->curlink) {
         $this->connect();
     }
     if (!($query = $func($sql, $this->curlink))) {
         if ($type != 'SILENT') {
             $this->halt('MySQL Query ERROR', $sql);
         }
     }
     DEBUG::query_counter();
     return $this->last_query = $query;
 }