$recordSet->Close(); # optional $conn->Close(); # optional
The code shown on the previous page is used to display the first two columns of the table. Once the sql statement is executed, the record set contains the result of the select statement as an array. Using a while loop we are able to traverse through each record and display the first two columns of the table. Once the display part is done, the cursor moves to the next record using the MoveNext() function. Similarly, we can perform any other operation on the record set.
Once we finish all operations on the record set, we can close it (though this is optional). Similarly we can close the connection to database (this is also optional).
This completes the explanation of the sample code that is used to connect to the Oracle database and perform operations on it using PHP’s ADOdb.
Note: All functions in ADOdb should be easy for Microsoft programmers to use because many of the conventions are similar to Microsoft’s own ADO.