/** * Move o ponteiro e retorna uma registro do result set PDOStatment. * * @return mixed|bool Retorna FALSE em caso de erro * @see intranet/include/clsBancoSQL_#ProximoRegistro() */ public function ProximoRegistro() { $row = $this->_rs->fetch($this->_fetchMode); if (is_array($row)) { array_walk_recursive($row, array($this, '_decodeUtf8')); } return $this->_row = $row; }
/** * Runs an execute and fetch query to the database. * * @param PDOStatment $STH prepared PDO statement * @param array [$bindParams = null] parameters to bind to the exeucute statement * * @return array of fetched data */ private static function fetch($STH, $bindParams = null) { //Check to see ff binding parameters needed, add if needed $bindParams === null ? $STH->execute() : $STH->execute($bindParams); //Create empty array to place result $result = array(); //Loop through and place each row into result array while ($row = $STH->fetch()) { $result[] = $row; } //Return result return $result; }