odbc_result

mixed odbc_result(resource result, mixed field) 

Displays query data.

Returns:

Field contents; FALSE on error

Description:

Returns the contents of a field specified by the field name or field offset in a result set.

Version:

Existing since version 3.0.6

Example:

Display query data
$db = odbc_connect("DSN","user","pass"); 
$result = odbc_exec($db,"SELECT LastName FROM Employees ORDER BY LastName"); 
while (odbc_fetch_row($result)) {
  echo odbc_result($result,"LastName"); 
} 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.