Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function fetchColumn($columnIndex = 0)
 {
     $value = $this->stmt->fetchColumn($columnIndex);
     if ($this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL | Connection::PORTABILITY_RTRIM)) {
         if ($this->portability & Connection::PORTABILITY_EMPTY_TO_NULL && $value === '') {
             $value = null;
         } elseif ($this->portability & Connection::PORTABILITY_RTRIM && is_string($value)) {
             $value = rtrim($value);
         }
     }
     return $value;
 }
Ejemplo n.º 2
0
 /**
  * Provide a simple fetchOne.
  *
  * fetch single column from the next row
  * @param int $column the column number to fetch
  * @return string
  */
 public function fetchOne($column = 0)
 {
     return $this->statement->fetchColumn($column);
 }
Ejemplo n.º 3
0
 public function fetchColumn($columnIndex = 0)
 {
     return $this->wrapped->fetchColumn($columnIndex);
 }
Ejemplo n.º 4
0
 /**
  * Returns a single column from the next row of a result set.
  *
  * @param integer $columnIndex
  *
  * @return mixed A single column from the next row of a result set or FALSE if there are no more rows.
  */
 public function fetchColumn($columnIndex = 0)
 {
     return $this->stmt->fetchColumn($columnIndex);
 }