Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » imagecreatefrompng()
  » site_pageranks()
  » imagepng()
  » imagedestroy()
  » imagestring()
  » imagecolorallocate()
  » htmlentities()
  » preg_match()
  » fopen()
  » header()
  » getimagesize()
  » preg_match_all()
  » session_start()
  » htmlspecialchars()
  » ob_start()
  » ob_flush()
  » strstr()
  » flush()
  » strpos()
  » setcookie()
  » str_replace()
  » array2vars()
  » nl2br()
  » preg_split()
  » ereg()
  » ereg_replace()
  » urlencode()
  » readgzfile()

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

PHP Functions

Function: ocifetchinto

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

ocifetchinto -- Fetches the next row into an array

Description

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

Note: This function is deprecated. Recommended alternatives: oci_fetch_array() , oci_fetch_object() , oci_fetch_assoc() and oci_fetch_row() .

ocifetchinto() fetches the next row of SELECT statement into the result array. ocifetchinto() overwrites previous content of result . By default result will contain a zero-based array of all columns that are not NULL .

The mode parameter allows you to change the default behaviour. You can specify more the one flag by simply adding them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). Valid values are:

OCI_ASSOC - return an associative array. OCI_NUM - return a numeric array starting with zero (default behaviour). OCI_RETURN_NULLS - return the empty values for column, which values is NULL . OCI_RETURN_LOBS - return the value of a LOB instead of the descriptor.

Example 1. ocifetchinto() example

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

Related Function(s)

  • oci_fetch_array()
  • oci_fetch_object()
  • oci_fetch_assoc()
  • oci_fetch_row()
  • oci_fetch()
  • oci_execute()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m