What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.



ifx_fetch_row — Get row as enumerated array


ifx_fetch_row(result, position);
int result: Result handler
mixed position: Result position


Array of column data


ifx_fetch_row() fetches a row of data from the result handler obtained from ifx_prepare() or ifx_query() . The row is returned as an associative array with the column name as the array key. Subsequent calls to ifx_fetch_row() would return the next row in the result set, or FALSE if there are no more rows.

If blob columns are returned in the reasult set, the value of these columns are returned as integer blob id values for use in ifx_get_blob() . If the functions ifx_textasvarchar() or ifx_byteasvarchar() have been used to modify query output, blobs values will be returned as strings.

The position parameter is an optional parameter for a "fetch" operation on "scroll" cursors: "NEXT", "PREVIOUS", "CURRENT", "FIRST", "LAST" or a number. If you specify a number, an absolute row fetch is executed. This parameter is optional, and only valid for SCROLL cursors.


Since version 3.0.3 and 4.0


Example 563. Display records from a table

function print_error($text) {
   echo "There was an error reported by the database.\n";
   echo "Error reported was: $text";

// try an oncorrect login
if (!$conn = @ifx_connect( "stores7@demo_se", "testuser", "password" )) {

// try an incorrect query
if (!$result = @ifx_query("SELECT customer_num, company FROM customer", $conn)) {
} else {
   while ($row = ifx_fetch_row($result)) {
      printf("%s %s<BR>", $row["customer_num"], $row["company"]);

PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at The authors of this book have elected not to choose any options under the OPL. This online book was obtained from and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.