• PHP Video Tutorials

PHP - Function fetch row



Syntax

bool odbc_fetch_row ( resource $result_id [, int $row_number ] )

Definition and Usage

It used to fetch a row

Return Values

It returns true if there was a row or else shows false

Parameters

Sr.No Parameters & Description
1

result_id

It used to identifier the result

2

rownumber

If row number is not specified, it try to fetch a row from odbc_row_fect(),

Examples

Try out following example

<?php
   $input_ID = odbc_connect("DSN","user_id","pass_id");
   $sql = "SELECT ProductName FROM Products";
   $result = odbc_exec($input_ID, $sql);
   
   while (odbc_fetch_row($result)) {
      echo odbc_result($result, "ProductName"), "\n";
   }
?>
php_function_reference.htm
Advertisements