public function formatOne(StatementInterface $stmt) { $this->checkInit(); $result = null; while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $result = $this->getAllObjectsFromRow($row); } $stmt->closeCursor(); return $result; }
public function formatOne(StatementInterface $stmt) { $this->checkInit(); $result = null; while ($row = $stmt->fetch(PDO::FETCH_NUM)) { if ($rowArray = $this->getStructuredArrayFromRow($row)) { $result = $rowArray; } } $stmt->closeCursor(); return $result; }
public function formatOne(StatementInterface $stmt) { $this->checkInit(); $result = null; while ($row = $stmt->fetch(PDO::FETCH_NUM)) { if ($object =& $this->getStructuredArrayFromRow($row)) { $result =& $object; } } $this->currentObjects = array(); $this->alreadyHydratedObjects = array(); $stmt->closeCursor(); return $result; }
/** * Fetches the next row from a result set. * * Fetches a row from a result set associated with a Statement object. * The fetch_style parameter determines how the Connection returns the row. * * @param integer $fetchStyle Controls how the next row will be returned to the caller. * * @return mixed */ public function fetch($fetchStyle = 4) { return $this->statement->fetch($fetchStyle); }