original_string: function loadDbResult(&$result, $textCol=null, $valueCol=null, $values=null)
      {
          if (!is_object($result) || !is_a($result, 'db_result')) {
              return self::raiseError('Argument 1 of HTML_Select::loadDbResult is not a valid DB_result');
          }
          if (isset($values)) {
              $this->setValue($values);
          }
          $fetchMode = ($textCol && $valueCol) ? DB_FETCHMODE_ASSOC : DB_FETCHMODE_ORDERED;
          while (is_array($row = $result->fetchRow($fetchMode)) ) {
              if ($fetchMode == DB_FETCHMODE_ASSOC) {
                  $this->addOption($row[$textCol], $row[$valueCol]);
              } else {
                  $this->addOption($row[0], $row[1]);
              }
          }
          return true;
      }
code: function loadDbResult(&$result, $textCol=null, $valueCol=null, $values=null)
      {
          if (!is_object($result) || !is_a($result, 'db_result')) {
              return self::raiseError('Argument 1 of HTML_Select::loadDbResult is not a valid DB_result');
          }
          if (isset($values)) {
              $this->setValue($values);
          }
          $fetchMode = ($textCol && $valueCol) ? DB_FETCHMODE_ASSOC : DB_FETCHMODE_ORDERED;
          while (is_array($row = $result->fetchRow($fetchMode)) ) {
              if ($fetchMode == DB_FETCHMODE_ASSOC) {
                  $this->addOption($row[$textCol], $row[$valueCol]);
              } else {
                  $this->addOption($row[0], $row[1]);
              }
          }
          return true;
      }
code_tokens: function loadDbResult ( & $ result , $ textCol = null , $ valueCol = null , $ values = null ) { if ( ! is_object ( $ result ) || ! is_a ( $ result , 'db_result' ) ) { return self :: raiseError ( 'Argument 1 of HTML_Select::loadDbResult is not a valid DB_result' ) ; } if ( isset ( $ values ) ) { $ this -> setValue ( $ values ) ; } $ fetchMode = ( $ textCol && $ valueCol ) ? DB_FETCHMODE_ASSOC : DB_FETCHMODE_ORDERED ; while ( is_array ( $ row = $ result -> fetchRow ( $ fetchMode ) ) ) { if ( $ fetchMode == DB_FETCHMODE_ASSOC ) { $ this -> addOption ( $ row [ $ textCol ] , $ row [ $ valueCol ] ) ; } else { $ this -> addOption ( $ row [ 0 ] , $ row [ 1 ] ) ; } } return true ; }
docstring: Loads the options from DB_result object
  
  If no column names are specified the first two columns of the result are
  used as the text and value columns respectively
  @param     object    $result     DB_result object
  @param     string    $textCol    (optional) Name of column to display as the OPTION text
  @param     string    $valueCol   (optional) Name of column to use as the OPTION value
  @param     mixed     $values     (optional) Array or comma delimited string of selected values
  @since     1.0
  @access    public
  @return    PEAR_Error on error or true
  @throws    PEAR_Error
docstring_tokens: Loads the options from DB_result object