yii\db\DataReader::readColumn PHP Method

readColumn() public method

Returns a single column from the next row of a result set.
public readColumn ( integer $columnIndex ) : mixed
$columnIndex integer zero-based column index
return mixed the column of the current row, false if no more rows available
    public function readColumn($columnIndex)
    {
        return $this->_statement->fetchColumn($columnIndex);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Returns a single column from the next row of a result set.
  * @param integer $columnIndex zero-based column index
  * @return mixed the column of the current row, false if no more rows available
  */
 public function readColumn($columnIndex)
 {
     //Try..Catch to prevent Function sequence error: -11067
     try {
         return parent::readColumn($columnIndex);
     } catch (\Exception $ex) {
     }
     return false;
 }
All Usage Examples Of yii\db\DataReader::readColumn