Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

The ocinumcols function returns the number of columns in a statement. See ocifetch
for an example of use.


integer ociparse(integer connection, string query)


The ociparse function creates a statement from a query. It requires a valid connection
identifier.


integer ociplogon(string user, string password, string sid)


The ociplogon function establishes a persistent connection to an Oracle database. These
connections exist as long as the server process. When you request a persistent connection,
you may get a connection that already exists, thus saving the overhead of establishing a
connection.


The returned identifier is used to create statements, cursors, and descriptors. The user
and password arguments are required. The optional sid argument specifies the server,
and if left out, the ORACLE_SID environment variable will be used.


Compare this function to ocilogon and ocinlogon.


string ociresult(integer statement, value column)


Use ociresult to get the value of a column on the current row. The column may be
identified by number or name. Columns are numbered starting with 1. Results are
returned as strings, except in the case of LOBs, ROWIDs, and FILEs. See ocifetch for
an example of use.


boolean ocirollback(integer connection)


Use ocirollback to issue a rollback operation on the given connection. By default, calls
to ociexecute are committed automatically, so be sure to override this functionality if
you wish to use ocirollback.


Keep in mind that if you used ocilogon or ociplogon to get more than one connection,
they may not be unique. Therefore issuing a rollback will affect all statements. To avoid
this situation use ocinlogon instead.


integer ocirowcount(integer statement)


The ocirowcount function returns the number of rows affected by an update, insert, or
delete.


string ociserverversion(integer connection)

Free download pdf