PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ora_execora_fetch>
Last updated: Mon, 16 Jul 2012

ora_fetch_into

(PHP 3, PHP 4, PHP 5)

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, $results, ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
echo
$results['MyColumn'];
?>

参见 ora_parse()ora_exec()ora_fetch()ora_do()




<ora_execora_fetch>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST