original_string: public function get_records_select($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
          if ($select) {
              $select = "WHERE $select";
          }
          if ($sort) {
              $sort = " ORDER BY $sort";
          }
          return $this->get_records_sql("SELECT $fields FROM {" . $table . "} $select $sort", $params, $limitfrom, $limitnum);
      }
code: public function get_records_select($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
          if ($select) {
              $select = "WHERE $select";
          }
          if ($sort) {
              $sort = " ORDER BY $sort";
          }
          return $this->get_records_sql("SELECT $fields FROM {" . $table . "} $select $sort", $params, $limitfrom, $limitnum);
      }
code_tokens: public function get_records_select ( $ table , $ select , array $ params = null , $ sort = '' , $ fields = '*' , $ limitfrom = 0 , $ limitnum = 0 ) { if ( $ select ) { $ select = "WHERE $select" ; } if ( $ sort ) { $ sort = " ORDER BY $sort" ; } return $ this -> get_records_sql ( "SELECT $fields FROM {" . $ table . "} $select $sort" , $ params , $ limitfrom , $ limitnum ) ; }
docstring: Get a number of records as an array of objects which match a particular WHERE clause.
  
  Return value is like {@link function get_records}.
  
  @param string $table The table to query.
  @param string $select A fragment of SQL to be used in a where clause in the SQL call.
  @param array $params An array of sql parameters
  @param string $sort An order to sort the results in (optional, a valid SQL ORDER BY parameter).
  @param string $fields A comma separated list of fields to return
  (optional, by default all fields are returned). The first field will be used as key for the
  array so must be a unique field such as 'id'.
  @param int $limitfrom return a subset of records, starting at this point (optional).
  @param int $limitnum return a subset comprising this many records in total (optional, required if $limitfrom is set).
  @return array of objects indexed by first column
  @throws dml_exception A DML specific exception is thrown for any errors.
docstring_tokens: Get a number of records as an array of objects which match a particular WHERE clause .