The php Function OCI_Parse
The php function oci_parse prepares a SQL statement for execution. The function is a standard part of the Oracle PHP extensions, which allow you to write Web applications that run on the Apache Web server and connect directly to an Oracle database. The oci_parse function is one of the functions that allows you to send meta data to the database when you execute a query, which is useful for performance monitoring and tracing.
The sql_text parameter is the SQL or PL/SQL statement to execute. The oci_parse() function converts the SQL statement into an array of oci_statement_idx objects. The oci_statement_idx object contains both associative and numeric indexes for each row of the query result set. This array is returned to your application after the oci_fetch_array() function returns all rows in the query result set.
Once the SQL or PL/SQL statements are converted to an array of oci_statement_idx, you can use oci_fetch_array() to retrieve all the rows in the query result set. oci_fetch_array() has an optional prefetch argument, which specifies the number of rows to buffer in the internal row buffer before returning them to PHP. The larger the prefetch value, the fewer physical database accesses are needed to return all the data to PHP, which can improve performance.
The prefetch argument also lets you specify a DATE column to be buffered, which is useful for performing queries that filter on date columns. Note that column alias names and DATE values are always returned in uppercase, so you must use TO_CHAR(SYSDATE, 'HH:MI:SS') to convert the date to a string to be used by oci_result.