original_string: public function record_exists_sql($sql, array $params=null) {
          $mrs = $this->get_recordset_sql($sql, $params, 0, 1);
          $return = $mrs->valid();
          $mrs->close();
          return $return;
      }
code: public function record_exists_sql($sql, array $params=null) {
          $mrs = $this->get_recordset_sql($sql, $params, 0, 1);
          $return = $mrs->valid();
          $mrs->close();
          return $return;
      }
code_tokens: public function record_exists_sql ( $ sql , array $ params = null ) { $ mrs = $ this -> get_recordset_sql ( $ sql , $ params , 0 , 1 ) ; $ return = $ mrs -> valid ( ) ; $ mrs -> close ( ) ; return $ return ; }
docstring: Test whether a SQL SELECT statement returns any records.
  
  This function returns true if the SQL statement executes
  without any errors and returns at least one record.
  
  @param string $sql The SQL statement to execute.
  @param array $params array of sql parameters
  @return bool true if the SQL executes without errors and returns at least one record.
  @throws dml_exception A DML specific exception is thrown for any errors.
docstring_tokens: Test whether a SQL SELECT statement returns any records .