ora_fetch_into

(PHP 3, PHP 4, PHP 5 <= 5.1.0RC1)

ora_fetch_into -- 將一行資料放入陣列

描述

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

取得一行資料並將它放入到一個陣列中。參數 flags 有兩個標誌值:若果設定 ORA_FETCHINTO_NULLS 標誌,值為 NULL 的列設定在陣列中;若果設定 ORA_FETCHINTO_ASSOC 標誌,將建立一個元素由資料庫欄位命名的陣列。

返回所取得行的列數。

例子 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'];
?>

參見 ora_parse()ora_exec()ora_fetch()ora_do()