Forum und email

ora_fetch_into

(PHP 4, PHP 5 <= 5.0.5)

ora_fetch_into — Fetch a row into the specified result array

설명

int ora_fetch_into ( resource $cursor , array &$result [, int $flags ] )

Fetches a row of data into an array.

매개변수

cursor

An Oracle cursor, opened with ora_open().

result

An array passed by reference. It will be filled with the fetched values.

flags

There are two possible flags. If ORA_FETCHINTO_NULLS is set, columns with NULL values are set in the array; and if the ORA_FETCHINTO_ASSOC flag is set, an associative array is created.

반환값

Returns the number of columns fetched, or FALSE on error.

변경 기록

버전 설명
5.1.0

oracle 확장은 권장되지 않습니다. oci8를 사용하십시오.

예제

Example#1 ora_fetch_into()

<?php
$results 
= array();
ora_fetch_into($cursor$results);
echo 
$results[0];
echo 
$results[1];
$results = array();
ora_fetch_into($cursor$resultsORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
echo 
$results['MyColumn'];
?>

주의

권장되지 않는 oracle을 대신하여 oci8를 사용할 때는 다음을 고려하십시오: