Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere PHP API » SQL Anywhere PHP API reference

sqlanywhere_execute Next Page



array sqlanywhere_fetch_array( resource result_identifier )


Fetches one row from the result set. This row is returned as an array that can be indexed by the column names or by the column indexes.


result_identifier    The result identifier returned by a sqlanywhere_query function.


An array that represents a row from the result set, or false when no rows are available.


This example shows how to retrieve all the rows in a result set. Each row is returned as an array.

$result = sqlanywhere_query( $conn, "SELECT GivenName, Surname FROM Employees" );
  While( ($row = sqlanywhere_fetch_array( $result )) ) {
        echo " GivenName = $row["GivenName"] \n" ;
        echo " Surname = $row[1] \n";
Related functions