original_string: public function get($table, $cols, $options = array(), $distinct = false, $total_rows = false)
      {
          // Get Data
          $rows = array();
          $result = $this->select($table, $cols, $options, $distinct, $total_rows);
          while ($row = $result->fetch(\PDO::FETCH_ASSOC)) {
              $rows[] = $row;
          }
          $num = count($rows);
  
          // Total rows?
          if ($total_rows) {
              $result = $this->doQuery('SELECT FOUND_ROWS()');
              list ($total_rows) = $result->fetch(\PDO::FETCH_NUM);
          } else {
              $total_rows = $num;
          }
  
          // Return the result
          return array(
              'data' => $rows,
              'num' => $num,
              'num_all' => $total_rows,
          );
      }
code: public function get($table, $cols, $options = array(), $distinct = false, $total_rows = false)
      {
          // Get Data
          $rows = array();
          $result = $this->select($table, $cols, $options, $distinct, $total_rows);
          while ($row = $result->fetch(\PDO::FETCH_ASSOC)) {
              $rows[] = $row;
          }
          $num = count($rows);
  
          // Total rows?
          if ($total_rows) {
              $result = $this->doQuery('SELECT FOUND_ROWS()');
              list ($total_rows) = $result->fetch(\PDO::FETCH_NUM);
          } else {
              $total_rows = $num;
          }
  
          // Return the result
          return array(
              'data' => $rows,
              'num' => $num,
              'num_all' => $total_rows,
          );
      }
code_tokens: public function get ( $ table , $ cols , $ options = array ( ) , $ distinct = false , $ total_rows = false ) { // Get Data $ rows = array ( ) ; $ result = $ this -> select ( $ table , $ cols , $ options , $ distinct , $ total_rows ) ; while ( $ row = $ result -> fetch ( \ PDO :: FETCH_ASSOC ) ) { $ rows [ ] = $ row ; } $ num = count ( $ rows ) ; // Total rows? if ( $ total_rows ) { $ result = $ this -> doQuery ( 'SELECT FOUND_ROWS()' ) ; list ( $ total_rows ) = $ result -> fetch ( \ PDO :: FETCH_NUM ) ; } else { $ total_rows = $ num ; } // Return the result return array ( 'data' => $ rows , 'num' => $ num , 'num_all' => $ total_rows , ) ; }
docstring: get data from database
  @param $table
  @param $cols
  @param array $options
  @param bool $distinct
  @param bool $total_rows
  @return array
  @throws \ErrorException
docstring_tokens: get data from database