downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

oci_fetch_row> <oci_fetch_assoc
[edit] Last updated: Fri, 18 Sep 2009

view this page in

oci_fetch_object

(PHP 5, PECL oci8 >= 1.1.0)

oci_fetch_objectReturns the next row from the result data as an object

Описание

object oci_fetch_object ( resource $statement )

Returns the next row from the result data as an object.

Subsequent calls to oci_fetch_object() will return the next row from the result or FALSE if there are no more rows.

За повече информация относно свързването на типове данни, което се извършва от oci8 драйвера, вижте типовете данни поддържани от драйвера

Параметри

statement

A valid OCI statement identifier.

Връщани стойности

Returns an object, which attributes correspond to fields in statement, or FALSE if there are no more rows in the statement .

Забележка: Тази функция установява NULL полетата със стойността null; в PHP.

Забележка: Oracle returns all field names in uppercase and associative indices in the result object will be uppercased too.

Вж. също

  • oci_fetch_array() - Returns the next row from the result data as an associative or numeric array, or both
  • oci_fetch_assoc() - Returns the next row from the result data as an associative array
  • oci_fetch_row() - Returns the next row from the result data as a numeric array
  • oci_fetch_all() - Fetches all rows of result data into an array



add a note add a note User Contributed Notes oci_fetch_object
juanloman at hilfetech dot com 08-May-2012 08:33
Please note that you can still reference a column that has a very complex name by using the curly syntax as shown in this example:

<?php

$queryStr
= 'SELECT COUNT(*) FROM FOOBAR'//Complex name!
  // parse and exec...
$queryObj = oci_fetch_object($quertStmt);
 
echo
'Count: ' . $queryObj->{'COUNT(*)'};  //Curly syntax reference

?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites