original_string: public function query_db($pagesize, $useinitialsbar = true) {
          global $DB;
  
          list($countsql, $countparams) = $this->get_sql_and_params(true);
          list($sql, $params) = $this->get_sql_and_params();
          $total = $DB->count_records_sql($countsql, $countparams);
          $this->pagesize($pagesize, $total);
          $this->rawdata = $DB->get_records_sql($sql, $params, $this->get_page_start(), $this->get_page_size());
  
          // Set initial bars.
          if ($useinitialsbar) {
              $this->initialbars($total > $pagesize);
          }
      }
code: public function query_db($pagesize, $useinitialsbar = true) {
          global $DB;
  
          list($countsql, $countparams) = $this->get_sql_and_params(true);
          list($sql, $params) = $this->get_sql_and_params();
          $total = $DB->count_records_sql($countsql, $countparams);
          $this->pagesize($pagesize, $total);
          $this->rawdata = $DB->get_records_sql($sql, $params, $this->get_page_start(), $this->get_page_size());
  
          // Set initial bars.
          if ($useinitialsbar) {
              $this->initialbars($total > $pagesize);
          }
      }
code_tokens: public function query_db ( $ pagesize , $ useinitialsbar = true ) { global $ DB ; list ( $ countsql , $ countparams ) = $ this -> get_sql_and_params ( true ) ; list ( $ sql , $ params ) = $ this -> get_sql_and_params ( ) ; $ total = $ DB -> count_records_sql ( $ countsql , $ countparams ) ; $ this -> pagesize ( $ pagesize , $ total ) ; $ this -> rawdata = $ DB -> get_records_sql ( $ sql , $ params , $ this -> get_page_start ( ) , $ this -> get_page_size ( ) ) ; // Set initial bars. if ( $ useinitialsbar ) { $ this -> initialbars ( $ total > $ pagesize ) ; } }
docstring: Query the DB.
  
  @param int $pagesize size of page for paginated displayed table.
  @param bool $useinitialsbar do you want to use the initials bar.
docstring_tokens: Query the DB .