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

ocifetchinto

(PHP 3 >= 3.0.4, PHP 4, PHP 5)

ocifetchinto -- »ñÈ¡ÏÂÒ»Ðе½Ò»¸öÊý×é

ÃèÊö

int ocifetchinto ( resource stmt, array &result [, int mode] )

ocifetchinto() »ñÈ¡ SELECT µÄÏÂÒ»Ðе½ result Êý×é¡£ ocifetchinto() ½«¸²¸Ç result ÒÔÇ°µÄÄÚÈÝ¡£ÔÚĬÈÏÇé¿öÏ£¬ result ½«º¬ÓÐËùÓÐ·Ç NULL ÁеÄÊý×é¡£¸ÃÊý×é´Ó 0 ¿ªÊ¼¼ÆÊý¡£

mode ²ÎÊýÔÊÐíÄã¸Ä±äĬÈϵÄÐÐΪ¡£ ¿ÉÒÔ¼òµ¥µÄ½«±êÖ¾Ïà¼ÓÀ´Ê¹Óöà¸ö±êÖ¾(ÁÐÈ磺 OCI_ASSOC+OCI_RETURN_NULLS)¡£ ±êÖ¾ÁбíÈçÏ£º

OCI_ASSOC ·µ»ØÒ»¸öÏà¹ØÊý×é¡£
OCI_NUM ·µ»ØÒ»¸ö´Ó 0 ¿ªÊ¼µÄÊý×ÖÊý×é¡£(ĬÈÏÇé¿ö)
OCI_RETURN_NULLS ·µ»Ø¿ÕÁС£
OCI_RETURN_LOBS ·µ»Ø LOB µÄÖµ¶ø²»ÊÇËüµÄÃèÊö·û¡£

例子 1. Ò»¸ö¼òµ¥µÄ ocifetchinto() Àý×Ó

<?php
$conn
= ocilogon("username", "password");

$query = "SELECT apples FROM oranges";

$statement = OCIParse ($conn, $query);
OCIExecute ($statement);

while (
OCIFetchInto ($statement, $row, OCI_ASSOC)) {
   echo
$row['apples'];
}
?>

²Î¼û ocifetch() ºÍ ociexecute()¡£




<ocifetchocifetchstatement>
 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