描述
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, $results, ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
echo $results['MyColumn'];
?>
|
|
参见 ora_parse(),ora_exec(),
ora_fetch() 和 ora_do()。