From 14da72b0c0e9bf730996cf1a0b1c9f4660820d7e Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Mon, 5 Feb 2007 03:10:57 +0000 Subject: [PATCH] WS, prepare for new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229011 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/nis/functions/yp-all.xml | 40 +- reference/nis/functions/yp-cat.xml | 40 +- reference/nis/functions/yp-err-string.xml | 60 ++- reference/nis/functions/yp-errno.xml | 90 +++-- reference/nis/functions/yp-first.xml | 62 ++- .../nis/functions/yp-get-default-domain.xml | 64 ++-- reference/nis/functions/yp-master.xml | 60 ++- reference/nis/functions/yp-match.xml | 70 ++-- reference/nis/functions/yp-next.xml | 64 ++-- reference/nis/functions/yp-order.xml | 58 +-- .../oci8/functions/oci-bind-array-by-name.xml | 204 +++++----- reference/oci8/functions/oci-bind-by-name.xml | 352 +++++++++--------- reference/oci8/functions/oci-cancel.xml | 52 +-- reference/oci8/functions/oci-close.xml | 76 ++-- reference/oci8/functions/oci-commit.xml | 110 +++--- reference/oci8/functions/oci-connect.xml | 198 +++++----- .../oci8/functions/oci-define-by-name.xml | 92 +++-- reference/oci8/functions/oci-error.xml | 126 +++---- reference/oci8/functions/oci-execute.xml | 84 ++--- reference/oci8/functions/oci-fetch-all.xml | 140 +++---- reference/oci8/functions/oci-fetch-array.xml | 204 +++++----- reference/oci8/functions/oci-fetch-assoc.xml | 74 ++-- reference/oci8/functions/oci-fetch-object.xml | 70 ++-- reference/oci8/functions/oci-fetch-row.xml | 64 ++-- reference/oci8/functions/oci-fetch.xml | 60 +-- .../oci8/functions/oci-field-is-null.xml | 58 +-- reference/oci8/functions/oci-field-name.xml | 98 ++--- .../oci8/functions/oci-field-precision.xml | 72 ++-- reference/oci8/functions/oci-field-scale.xml | 68 ++-- reference/oci8/functions/oci-field-size.xml | 96 ++--- .../oci8/functions/oci-field-type-raw.xml | 64 ++-- reference/oci8/functions/oci-field-type.xml | 138 +++---- .../oci8/functions/oci-free-statement.xml | 44 ++- .../oci8/functions/oci-internal-debug.xml | 54 +-- reference/oci8/functions/oci-lob-copy.xml | 56 +-- reference/oci8/functions/oci-lob-is-equal.xml | 36 +- reference/oci8/functions/oci-lob-savefile.xml | 3 +- .../oci8/functions/oci-lob-writetofile.xml | 3 +- .../oci8/functions/oci-new-collection.xml | 68 ++-- reference/oci8/functions/oci-new-connect.xml | 200 +++++----- reference/oci8/functions/oci-new-cursor.xml | 92 ++--- .../oci8/functions/oci-new-descriptor.xml | 116 +++--- reference/oci8/functions/oci-num-fields.xml | 94 +++-- reference/oci8/functions/oci-num-rows.xml | 92 ++--- reference/oci8/functions/oci-parse.xml | 82 ++-- .../oci8/functions/oci-password-change.xml | 94 ++--- reference/oci8/functions/oci-pconnect.xml | 172 ++++----- reference/oci8/functions/oci-result.xml | 84 ++--- reference/oci8/functions/oci-rollback.xml | 80 ++-- .../oci8/functions/oci-server-version.xml | 66 ++-- reference/oci8/functions/oci-set-prefetch.xml | 72 ++-- .../oci8/functions/oci-statement-type.xml | 114 +++--- reference/oci8/functions/ocifetchinto.xml | 140 +++---- 53 files changed, 2425 insertions(+), 2445 deletions(-) diff --git a/reference/nis/functions/yp-all.xml b/reference/nis/functions/yp-all.xml index 7c57f49c18..7e1dc40faa 100644 --- a/reference/nis/functions/yp-all.xml +++ b/reference/nis/functions/yp-all.xml @@ -1,26 +1,24 @@ - + - - - yp_all - - Traverse the map and call a function on each entry - - - - Description - - voidyp_all - stringdomain - stringmap - stringcallback - - - &warn.undocumented.func; - - - + + + yp_all + Traverse the map and call a function on each entry + + + Description + + voidyp_all + stringdomain + stringmap + stringcallback + + + &warn.undocumented.func; + + + + - - - yp_cat - - Return an array containing the entire map - - - - Description - - arrayyp_cat - stringdomain - stringmap - - - yp_cat returns all map entries as an array with the - maps key values as array indices and the maps entries as array data. - - - + + + yp_cat + Return an array containing the entire map + + + Description + + arrayyp_cat + stringdomain + stringmap + + + yp_cat returns all map entries as an array with the + maps key values as array indices and the maps entries as array data. + + + + - - - yp_err_string - - Returns the error string associated with the given error code - - - - Description - - stringyp_err_string - interrorcode - - - yp_err_string returns the error message - associated with the given error code. Useful to indicate what - exactly went wrong. - - - - Example for NIS errors - + + + yp_err_string + Returns the error string associated with the given error code + + + Description + + stringyp_err_string + interrorcode + + + yp_err_string returns the error message + associated with the given error code. Useful to indicate what + exactly went wrong. + + + + Example for NIS errors + ]]> - - - - - See also yp_errno. - - - + + + + + See also yp_errno. + + + + - - - yp_errno - - Returns the error code of the previous operation - - - - Description - - intyp_errno - - - - yp_errno returns the error code of the - previous operation. - - - Possible errors are: - - - - 1 args to function are bad - 2 RPC failure - domain has been unbound - 3 can't bind to server on this domain - 4 no such map in server's domain - 5 no such key in map - 6 internal yp server or client error - 7 resource allocation failure - 8 no more records in map database - 9 can't communicate with portmapper - 10 can't communicate with ypbind - 11 can't communicate with ypserv - 12 local domain name not set - 13 yp database is bad - 14 yp version mismatch - 15 access violation - 16 database busy - - - - See also yp_err_string. - - - + + + yp_errno + Returns the error code of the previous operation + + + Description + + intyp_errno + + + + yp_errno returns the error code of the + previous operation. + + + Possible errors are: + + + + 1 args to function are bad + 2 RPC failure - domain has been unbound + 3 can't bind to server on this domain + 4 no such map in server's domain + 5 no such key in map + 6 internal yp server or client error + 7 resource allocation failure + 8 no more records in map database + 9 can't communicate with portmapper + 10 can't communicate with ypbind + 11 can't communicate with ypserv + 12 local domain name not set + 13 yp database is bad + 14 yp version mismatch + 15 access violation + 16 database busy + + + + See also yp_err_string. + + + + - - - yp_first - - Returns the first key-value pair from the named map - - - - Description - - arrayyp_first - stringdomain - stringmap - - - yp_first returns the first key-value - pair from the named map in the named domain, otherwise &false;. - - - - Example for the NIS first - + + + yp_first + Returns the first key-value pair from the named map + + + Description + + arrayyp_first + stringdomain + stringmap + + + yp_first returns the first key-value + pair from the named map in the named domain, otherwise &false;. + + + + Example for the NIS first + ]]> - - - - - See also yp_next and - yp_get_default_domain. - - - + + + + + See also yp_next and + yp_get_default_domain. + + + + - - - yp_get_default_domain - Fetches the machine's default NIS domain - - - Description - - stringyp_get_default_domain - - - - yp_get_default_domain returns the default - domain of the node or &false;. Can be used as the domain parameter - for successive NIS calls. - - - A NIS domain can be described a group of NIS maps. Every host - that needs to look up information binds itself to a certain - domain. Refer to the documents mentioned at the beginning for - more detailed information. - - - - Example for the default domain - + + + yp_get_default_domain + Fetches the machine's default NIS domain + + + Description + + stringyp_get_default_domain + + + + yp_get_default_domain returns the default + domain of the node or &false;. Can be used as the domain parameter + for successive NIS calls. + + + A NIS domain can be described a group of NIS maps. Every host + that needs to look up information binds itself to a certain + domain. Refer to the documents mentioned at the beginning for + more detailed information. + + + + Example for the default domain + ]]> - - - - - + + + + + + - - - yp_master - - Returns the machine name of the master NIS server for a map - - - - Description - - stringyp_master - stringdomain - stringmap - - - yp_master returns the machine name of - the master NIS server for a map. - - - - Example for the NIS master - + + + yp_master + Returns the machine name of the master NIS server for a map + + + Description + + stringyp_master + stringdomain + stringmap + + + yp_master returns the machine name of + the master NIS server for a map. + + + + Example for the NIS master + ]]> - - - - - See also yp_get_default_domain. - - - + + + + + See also yp_get_default_domain. + + + + - - - yp_match - Returns the matched line - - - Description - - stringyp_match - stringdomain - stringmap - stringkey - - - yp_match returns the value associated with - the passed key out of the specified map or &false;. This key must - be exact. - - - Example for NIS match - + + + yp_match + Returns the matched line + + + Description + + stringyp_match + stringdomain + stringmap + stringkey + + + yp_match returns the value associated with + the passed key out of the specified map or &false;. This key must + be exact. + + + Example for NIS match + ]]> - - - The above code will produce : - - + + + The above code will produce : + + - - - - - See also yp_get_default_domain. - - - + + + + + See also yp_get_default_domain. + + + + - - - yp_next - Returns the next key-value pair in the named map - - - Description - - arrayyp_next - stringdomain - stringmap - stringkey - - - yp_next returns the next key-value pair in - the named map after the specified key or &false;. - - - - Example for NIS next - + + + yp_next + Returns the next key-value pair in the named map + + + Description + + arrayyp_next + stringdomain + stringmap + stringkey + + + yp_next returns the next key-value pair in + the named map after the specified key or &false;. + + + + Example for NIS next + ]]> - - - - - See also yp_first and - yp_get_default_domain. - - - + + + + + See also yp_first and + yp_get_default_domain. + + + + - - - yp_order - Returns the order number for a map - - - Description - - intyp_order - stringdomain - stringmap - - - yp_order returns the order number for a map - or &false;. - - - - Example for the NIS order - + + + yp_order + Returns the order number for a map + + + Description + + intyp_order + stringdomain + stringmap + + + yp_order returns the order number for a map + or &false;. + + + + Example for the NIS order + ]]> - - - - - See also yp_get_default_domain. - - - + + + + + See also yp_get_default_domain. + + + - - - oci_bind_array_by_name - - Binds PHP array to Oracle PL/SQL array by name - - - - Description - - booloci_bind_array_by_name - resourcestmt - stringname - arrayvar_array - intmax_table_length - intmax_item_length - inttype - - + + + + oci_bind_array_by_name + Binds PHP array to Oracle PL/SQL array by name + + + Description + + booloci_bind_array_by_name + resourcestmt + stringname + arrayvar_array + intmax_table_length + intmax_item_length + inttype + + + + This function is available since OCI8 release 1.2 and PHP release 5.1.2. + + + + oci_bind_array_by_name binds the PHP array + var_array to the Oracle placeholder + name, which points to Oracle PL/SQL array. + Whether it will be used for input or output will be determined at + run-time. The max_table_length + parameter sets the maximum length both for incoming and result arrays. + Parameter max_item_length sets maximum length for + array items. If max_item_length was not specified + or equals to -1, oci_bind_array_by_name will use + find the longest element in the incoming array and will use it as + maximum length for array items. type parameter + should be used to set the type of PL/SQL array items. See list of + available types below. + + + + - This function is available since OCI8 release 1.2 and PHP release 5.1.2. + SQLT_NUM - for arrays of NUMBER. - - - oci_bind_array_by_name binds the PHP array - var_array to the Oracle placeholder - name, which points to Oracle PL/SQL array. - Whether it will be used for input or output will be determined at - run-time. The max_table_length - parameter sets the maximum length both for incoming and result arrays. - Parameter max_item_length sets maximum length for - array items. If max_item_length was not specified - or equals to -1, oci_bind_array_by_name will use - find the longest element in the incoming array and will use it as - maximum length for array items. type parameter - should be used to set the type of PL/SQL array items. See list of - available types below. - - - - - - SQLT_NUM - for arrays of NUMBER. - - - - - SQLT_INT - for arrays of INTEGER (Note: INTEGER - it is actually a synonym for NUMBER(38), but - SQLT_NUM type won't work in this case even - though they are synonyms). - - - - - SQLT_FLT - for arrays of FLOAT. - - - - - SQLT_AFC - for arrays of CHAR. - - - - - SQLT_CHR - for arrays of VARCHAR2. - - - - - SQLT_VCS - for arrays of VARCHAR. - - - - - SQLT_AVC - for arrays of CHARZ. - - - - - SQLT_STR - for arrays of STRING. - - - - - SQLT_LVC - for arrays of LONG VARCHAR. - - - - - SQLT_ODT - for arrays of DATE. - - - - - - - <function>oci_bind_array_by_name</function>example - + + + + SQLT_INT - for arrays of INTEGER (Note: INTEGER + it is actually a synonym for NUMBER(38), but + SQLT_NUM type won't work in this case even + though they are synonyms). + + + + + SQLT_FLT - for arrays of FLOAT. + + + + + SQLT_AFC - for arrays of CHAR. + + + + + SQLT_CHR - for arrays of VARCHAR2. + + + + + SQLT_VCS - for arrays of VARCHAR. + + + + + SQLT_AVC - for arrays of CHARZ. + + + + + SQLT_STR - for arrays of STRING. + + + + + SQLT_LVC - for arrays of LONG VARCHAR. + + + + + SQLT_ODT - for arrays of DATE. + + + + + + + <function>oci_bind_array_by_name</function>example + ]]> - - - - - + + + + + - - - oci_bind_by_name - - Binds the PHP variable to the Oracle placeholder - - - - Description - - booloci_bind_by_name - resourcestmt - stringph_name - mixedvariable - intmaxlength - inttype - - - oci_bind_by_name binds the PHP variable - variable to the Oracle placeholder - ph_name. Whether it will be used for - input or output will be determined at run-time and the necessary - storage space will be allocated. The length - parameter sets the maximum length for the bind. If you set - length to -1 - oci_bind_by_name will use the current length of - variable to set the maximum length. - - - If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - need to allocate it first using the - oci_new_descriptor function. The - length is not used for abstract datatypes - and should be set to -1. The type parameter - tells Oracle which descriptor is used. Possible - values are: - - - - SQLT_FILE - for BFILEs; - - - - - SQLT_CFILE - for CFILEs; - - - - - SQLT_CLOB - for CLOBs; - - - - - SQLT_BLOB - for BLOBs; - - - - - SQLT_RDD - for ROWIDs; - - - - - SQLT_NTY - for named datatypes; - - - - - SQLT_INT - for integers; - - - - - SQLT_CHR - for VARCHARs; - - - - - SQLT_BIN - for RAW columns; - - - - - SQLT_LNG - for LONG columns; - - - - - SQLT_LBI - for LONG RAW columns; - - - - - SQLT_RSET - for cursors, that were created - before with oci_new_cursor. - - - - - - - <function>oci_bind_by_name</function>example - + + + + oci_bind_by_name + Binds the PHP variable to the Oracle placeholder + + + Description + + booloci_bind_by_name + resourcestmt + stringph_name + mixedvariable + intmaxlength + inttype + + + oci_bind_by_name binds the PHP variable + variable to the Oracle placeholder + ph_name. Whether it will be used for + input or output will be determined at run-time and the necessary + storage space will be allocated. The length + parameter sets the maximum length for the bind. If you set + length to -1 + oci_bind_by_name will use the current length of + variable to set the maximum length. + + + If you need to bind an abstract datatype (LOB/ROWID/BFILE) you + need to allocate it first using the + oci_new_descriptor function. The + length is not used for abstract datatypes + and should be set to -1. The type parameter + tells Oracle which descriptor is used. Possible + values are: + + + + SQLT_FILE - for BFILEs; + + + + + SQLT_CFILE - for CFILEs; + + + + + SQLT_CLOB - for CLOBs; + + + + + SQLT_BLOB - for BLOBs; + + + + + SQLT_RDD - for ROWIDs; + + + + + SQLT_NTY - for named datatypes; + + + + + SQLT_INT - for integers; + + + + + SQLT_CHR - for VARCHARs; + + + + + SQLT_BIN - for RAW columns; + + + + + SQLT_LNG - for LONG columns; + + + + + SQLT_LBI - for LONG RAW columns; + + + + + SQLT_RSET - for cursors, that were created + before with oci_new_cursor. + + + + + + + <function>oci_bind_by_name</function>example + "Larry", - 2222 => "Bill", + 1111 => "Larry", + 2222 => "Bill", 3333 => "Jim" ); @@ -138,10 +136,10 @@ oci_bind_by_name($stmt, ":rid", $rowid, -1, OCI_B_ROWID); $update = oci_parse($conn, " UPDATE - emp - SET - sal = :sal - WHERE + emp + SET + sal = :sal + WHERE ROWID = :rid "); oci_bind_by_name($update, ":rid", $rowid, -1, OCI_B_ROWID); @@ -152,7 +150,7 @@ $sal = 10000; foreach ($data as $empno => $ename) { oci_execute($stmt); oci_execute($update); -} +} $rowid->free(); @@ -160,17 +158,17 @@ oci_free_statement($update); oci_free_statement($stmt); $stmt = oci_parse($conn, " - SELECT - * - FROM - emp - WHERE - empno - IN + SELECT + * + FROM + emp + WHERE + empno + IN (1111,2222,3333) "); oci_execute($stmt); - + while ($row = oci_fetch_assoc($stmt)) { var_dump($row); } @@ -180,10 +178,10 @@ oci_free_statement($stmt); /* delete our "junk" from the emp table.... */ $stmt = oci_parse($conn, " DELETE FROM - emp - WHERE - empno - IN + emp + WHERE + empno + IN (1111,2222,3333) "); oci_execute($stmt); @@ -192,17 +190,17 @@ oci_free_statement($stmt); oci_close($conn); ?> ]]> - - - - - Remember, this function strips trailing whitespaces. See the following - example: - - - - <function>oci_bind_by_name</function> example - + + + + + Remember, this function strips trailing whitespaces. See the following + example: + + + + <function>oci_bind_by_name</function> example + ]]> - - - - - - <function>oci_bind_by_name</function> example - + + + + + + <function>oci_bind_by_name</function> example + ]]> - - - - - - Do not use magic_quotes_gpc or - addslashes and oci_bind_by_name - simultaneously as no quoting is needed and any magically applied quotes - will be written into your database as oci_bind_by_name - is not able to distinguish magically added quotings from those added - intentionally. - - - - &return.success; - - - - In PHP versions before 5.0.0 you must use ocibindbyname instead. - This name still can be used, it was left as alias of - oci_bind_by_name for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + + Do not use magic_quotes_gpc or + addslashes and oci_bind_by_name + simultaneously as no quoting is needed and any magically applied quotes + will be written into your database as oci_bind_by_name + is not able to distinguish magically added quotings from those added + intentionally. + + + + &return.success; + + + + In PHP versions before 5.0.0 you must use ocibindbyname instead. + This name still can be used, it was left as alias of + oci_bind_by_name for downwards compatability. + This, however, is deprecated and not recommended. + + + + + - - oci_cancel - Cancels reading from cursor - - - Description - - booloci_cancel - resourcestmt - - - oci_cancel invalidates a cursor, freeing all - associated resources and cancels the ability to read from it. - - - &return.success; - - - In PHP versions before 5.0.0 you must use ocicancel instead. - This name still can be used, it was left as alias of - oci_cancel for downwards compatability. - This, however, is deprecated and not recommended. - - - + + oci_cancel + Cancels reading from cursor + + + Description + + booloci_cancel + resourcestmt + + + oci_cancel invalidates a cursor, freeing all + associated resources and cancels the ability to read from it. + + + &return.success; + + + In PHP versions before 5.0.0 you must use ocicancel instead. + This name still can be used, it was left as alias of + oci_cancel for downwards compatability. + This, however, is deprecated and not recommended. + + + - - - oci_close - Closes Oracle connection - - - Description - - booloci_close - resourceconnection - - - oci_close closes the Oracle connection - connection. - - - - Starting from the version 1.1 oci_close correctly - closes the Oracle connection. - Use oci8.old_oci_close_semantics - option to restore old behaviour of this function. - - - - &return.success; - - - - In PHP versions before 5.0.0 you must use ocilogoff instead. - This name still can be used, it was left as alias of - oci_close for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_close + Closes Oracle connection + + + Description + + booloci_close + resourceconnection + + + oci_close closes the Oracle connection + connection. + + + + Starting from the version 1.1 oci_close correctly + closes the Oracle connection. + Use oci8.old_oci_close_semantics + option to restore old behaviour of this function. + + + + &return.success; + + + + In PHP versions before 5.0.0 you must use ocilogoff instead. + This name still can be used, it was left as alias of + oci_close for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_commit - Commits outstanding statements - - - Description - - booloci_commit - resourceconnection - - - oci_commit commits all outstanding statements - for the active transaction on the Oracle connection - connection. - - - - <function>oci_commit</function> example - + + + + oci_commit + Commits outstanding statements + + + Description + + booloci_commit + resourceconnection + + + oci_commit commits all outstanding statements + for the active transaction on the Oracle connection + connection. + + + + <function>oci_commit</function> example + ]]> - - - - - &return.success; - - - - Transactions are automatically rolled back when you close - the connection, or when the script ends, whichever is soonest. You - need to explicitly call oci_commit to commit - the transaction, or oci_rollback to abort it. - - - - - In PHP versions before 5.0.0 you must use ocicommit instead. - This name still can be used, it was left as alias of - oci_commit for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_rollback and - oci_execute. - - - + + + + + &return.success; + + + + Transactions are automatically rolled back when you close + the connection, or when the script ends, whichever is soonest. You + need to explicitly call oci_commit to commit + the transaction, or oci_rollback to abort it. + + + + + In PHP versions before 5.0.0 you must use ocicommit instead. + This name still can be used, it was left as alias of + oci_commit for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_rollback and + oci_execute. + + + - - - oci_connect - Establishes a connection to the Oracle server - - - Description - - resourceoci_connect - stringusername - stringpassword - stringdb - stringcharset - intsession_mode - - - oci_connect returns a connection identifier - needed for most other OCI calls. The optional third parameter - can either contain the name of the local Oracle instance or the - name of the entry in tnsnames.ora to which - you want to connect. - If the optional third parameter is not specified, PHP uses the - environment variables ORACLE_SID (Oracle - instance) or TWO_TASK - (tnsnames.ora) to determine which database - to connect to. - - - Parameter session_mode is available since version - 1.1 and accepts the following values: OCI_DEFAULT, - OCI_SYSOPER and OCI_SYSDBA. - If either OCI_SYSOPER or - OCI_SYSDBA were specified, - oci_connect will try to establish privileged - connection using external credentials. Privileged connections are - disabled by default. To enable them you need to set oci8.privileged_connect - to On. - - - - If you're using PHP with Oracle Instant Client, you can use easy connect - naming method described here: - &url.oracle.oic.connect;. - Basically this means you can specify "//db_host[:port]/database_name" - as database name. But if you want to use the old way of naming you - must set either ORACLE_HOME or - TNS_ADMIN. - - - - - The second and subsequent calls to oci_connect - with the same parameters will return the connection handle returned - from the first call. This means that queries issued against one - handle are also applied to the other handles, because they are the - same handle. This behaviour is demonstrated in - Example 1 below. If you require two handles to be transactionally - isolated from each other, you should use - oci_new_connect instead. - - - &oci.charset; - - - <function>oci_connect</function> example - + + + + oci_connect + Establishes a connection to the Oracle server + + + Description + + resourceoci_connect + stringusername + stringpassword + stringdb + stringcharset + intsession_mode + + + oci_connect returns a connection identifier + needed for most other OCI calls. The optional third parameter + can either contain the name of the local Oracle instance or the + name of the entry in tnsnames.ora to which + you want to connect. + If the optional third parameter is not specified, PHP uses the + environment variables ORACLE_SID (Oracle + instance) or TWO_TASK + (tnsnames.ora) to determine which database + to connect to. + + + Parameter session_mode is available since version + 1.1 and accepts the following values: OCI_DEFAULT, + OCI_SYSOPER and OCI_SYSDBA. + If either OCI_SYSOPER or + OCI_SYSDBA were specified, + oci_connect will try to establish privileged + connection using external credentials. Privileged connections are + disabled by default. To enable them you need to set oci8.privileged_connect + to On. + + + + If you're using PHP with Oracle Instant Client, you can use easy connect + naming method described here: + &url.oracle.oic.connect;. + Basically this means you can specify "//db_host[:port]/database_name" + as database name. But if you want to use the old way of naming you + must set either ORACLE_HOME or + TNS_ADMIN. + + + + + The second and subsequent calls to oci_connect + with the same parameters will return the connection handle returned + from the first call. This means that queries issued against one + handle are also applied to the other handles, because they are the + same handle. This behaviour is demonstrated in + Example 1 below. If you require two handles to be transactionally + isolated from each other, you should use + oci_new_connect instead. + + + &oci.charset; + + + <function>oci_connect</function> example + "; @@ -75,48 +75,48 @@ $db = ""; $c1 = oci_connect("scott", "tiger", $db); $c2 = oci_connect("scott", "tiger", $db); -function create_table($conn) +function create_table($conn) { $stmt = oci_parse($conn, "create table scott.hallo (test varchar2(64))"); oci_execute($stmt); echo $conn . " created table\n\n"; } -function drop_table($conn) +function drop_table($conn) { $stmt = oci_parse($conn, "drop table scott.hallo"); oci_execute($stmt); echo $conn . " dropped table\n\n"; } -function insert_data($conn) +function insert_data($conn) { - $stmt = oci_parse($conn, "insert into scott.hallo + $stmt = oci_parse($conn, "insert into scott.hallo values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " inserted hallo\n\n"; } -function delete_data($conn) +function delete_data($conn) { $stmt = oci_parse($conn, "delete from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " deleted hallo\n\n"; } -function commit($conn) +function commit($conn) { oci_commit($conn); echo $conn . " committed\n\n"; } -function rollback($conn) +function rollback($conn) { oci_rollback($conn); echo $conn . " rollback\n\n"; } -function select_data($conn) +function select_data($conn) { $stmt = oci_parse($conn, "select * from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); @@ -132,12 +132,12 @@ insert_data($c1); // Insert a row using c1 insert_data($c2); // Insert a row using c2 select_data($c1); // Results of both inserts are returned -select_data($c2); +select_data($c2); rollback($c1); // Rollback using c1 select_data($c1); // Both inserts have been rolled back -select_data($c2); +select_data($c2); insert_data($c2); // Insert a row using c2 commit($c2); // Commit using c2 @@ -156,27 +156,27 @@ drop_table($c1); echo ""; ?> ]]> - - - - - oci_connect returns &false; if an error occured. - - - - In PHP versions before 5.0.0 you must use ocilogon instead. - This name still can be used, it was left as the alias of - oci_connect for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_pconnect, - oci_new_connect and - oci_close. - - - + + + + + oci_connect returns &false; if an error occured. + + + + In PHP versions before 5.0.0 you must use ocilogon instead. + This name still can be used, it was left as the alias of + oci_connect for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_pconnect, + oci_new_connect and + oci_close. + + + - - - oci_define_by_name - - Uses a PHP variable for the define-step during a SELECT - - - - Description - - booloci_define_by_name - resourcestatement - stringcolumn_name - mixedvariable - inttype - - - oci_define_by_name defines PHP variables for fetches - of SQL-Columns. Take into consideration that Oracle uses ALL-UPPERCASE column names, - whereby in your select you can also use lowercase. - oci_define_by_name expects - the column_name to be in uppercase. If you - define a variable that doesn't exists in your select statement, no - error will be issued. - - - If you need to define an abstract datatype (LOB/ROWID/BFILE) you - must allocate it first using - oci_new_descriptor. See also the - oci_bind_by_name function. - - - <function>oci_define_by_name</function> example - + + + + oci_define_by_name + Uses a PHP variable for the define-step during a SELECT + + + Description + + booloci_define_by_name + resourcestatement + stringcolumn_name + mixedvariable + inttype + + + oci_define_by_name defines PHP variables for fetches + of SQL-Columns. Take into consideration that Oracle uses ALL-UPPERCASE column names, + whereby in your select you can also use lowercase. + oci_define_by_name expects + the column_name to be in uppercase. If you + define a variable that doesn't exists in your select statement, no + error will be issued. + + + If you need to define an abstract datatype (LOB/ROWID/BFILE) you + must allocate it first using + oci_new_descriptor. See also the + oci_bind_by_name function. + + + <function>oci_define_by_name</function> example + ]]> - - - - - In PHP versions before 5.0.0 you must use ocidefinebyname instead. - This name still can be used, it was left as alias of - oci_define_by_name for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + In PHP versions before 5.0.0 you must use ocidefinebyname instead. + This name still can be used, it was left as alias of + oci_define_by_name for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_error - Returns the last error found - - - Description - - arrayoci_error - resourcesource - - - For most errors, the parameter is the most appropriate resource - handle. For connection errors with oci_connect, - oci_new_connect or oci_pconnect, - do not pass a parameter. If no error is found, oci_error - returns &false;. oci_error returns the error as an - associative array. In this array, code - consists the oracle error code and message - the oracle error string. - - - As of PHP 4.3 - - offset and sqltext will - also be included in the return array to indicate the location - of the error and the original SQL text which caused it. - - - - - Displaying the Oracle error message after a connection error - + + + + oci_error + Returns the last error found + + + Description + + arrayoci_error + resourcesource + + + For most errors, the parameter is the most appropriate resource + handle. For connection errors with oci_connect, + oci_new_connect or oci_pconnect, + do not pass a parameter. If no error is found, oci_error + returns &false;. oci_error returns the error as an + associative array. In this array, code + consists the oracle error code and message + the oracle error string. + + + As of PHP 4.3 + + offset and sqltext will + also be included in the return array to indicate the location + of the error and the original SQL text which caused it. + + + + + Displaying the Oracle error message after a connection error + - - - - - - Displaying the Oracle error message after a parsing error - + + + + + + Displaying the Oracle error message after a parsing error + - - - - - - Displaying the Oracle error message and problematic statement - after an execution error - + + + + + + Displaying the Oracle error message and problematic statement + after an execution error + "; -} +} ]]> - - - - - - In PHP versions before 5.0.0 you must use ocierror instead. - This name still can be used, it was left as alias of - oci_error for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + + In PHP versions before 5.0.0 you must use ocierror instead. + This name still can be used, it was left as alias of + oci_error for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_execute - Executes a statement - - - Description - - booloci_execute - resourcestmt - intmode - - - oci_execute executes a previously parsed - statement (see oci_parse). The optional - mode allows you to specify the - execution mode (default is OCI_COMMIT_ON_SUCCESS). - If you don't want statements to be committed automatically, - you should specify OCI_DEFAULT as your - mode. - - - When using OCI_DEFAULT mode, you're creating a - transaction. Transactions are automatically rolled back when you close - the connection, or when the script ends, whichever is soonest. You - need to explicitly call oci_commit to commit - the transaction, or oci_rollback to abort it. - - - &return.success; - - - - In PHP versions before 5.0.0 you must use ociexecute instead. - This name still can be used, it was left as alias of - oci_execute for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_execute + Executes a statement + + + Description + + booloci_execute + resourcestmt + intmode + + + oci_execute executes a previously parsed + statement (see oci_parse). The optional + mode allows you to specify the + execution mode (default is OCI_COMMIT_ON_SUCCESS). + If you don't want statements to be committed automatically, + you should specify OCI_DEFAULT as your + mode. + + + When using OCI_DEFAULT mode, you're creating a + transaction. Transactions are automatically rolled back when you close + the connection, or when the script ends, whichever is soonest. You + need to explicitly call oci_commit to commit + the transaction, or oci_rollback to abort it. + + + &return.success; + + + + In PHP versions before 5.0.0 you must use ociexecute instead. + This name still can be used, it was left as alias of + oci_execute for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_fetch_all - Fetches all rows of result data into an array - - - Description - - intoci_fetch_all - resourcestatement - arrayoutput - intskip - intmaxrows - intflags - - - oci_fetch_all fetches all the rows from a - result into a user-defined array. - oci_fetch_all returns the number of rows - fetched or &false; in case of an error. skip - is the number of initial rows to ignore when fetching the result - (default value of 0, to start at the first line). - maxrows is the number of - rows to read, starting at the skipth row - (default to -1, meaning all the rows). - - &database.fetch-null; - - Parameter flags can be any combination of - the following: - - - OCI_FETCHSTATEMENT_BY_ROW - - - OCI_FETCHSTATEMENT_BY_COLUMN (default value) - - - OCI_NUM - - - OCI_ASSOC - - - - - - <function>oci_fetch_all</function> example - + + + + oci_fetch_all + Fetches all rows of result data into an array + + + Description + + intoci_fetch_all + resourcestatement + arrayoutput + intskip + intmaxrows + intflags + + + oci_fetch_all fetches all the rows from a + result into a user-defined array. + oci_fetch_all returns the number of rows + fetched or &false; in case of an error. skip + is the number of initial rows to ignore when fetching the result + (default value of 0, to start at the first line). + maxrows is the number of + rows to read, starting at the skipth row + (default to -1, meaning all the rows). + + &database.fetch-null; + + Parameter flags can be any combination of + the following: + + + OCI_FETCHSTATEMENT_BY_ROW + + + OCI_FETCHSTATEMENT_BY_COLUMN (default value) + + + OCI_NUM + + + OCI_ASSOC + + + + + + <function>oci_fetch_all</function> example + 0) { echo "$key\n"; } echo "\n"; - + for ($i = 0; $i < $nrows; $i++) { echo "\n"; foreach ($results as $data) { @@ -78,30 +78,30 @@ if ($nrows > 0) { echo "\n"; } else { echo "No data found
\n"; -} +} echo "$nrows Records Selected
\n"; - + oci_free_statement($stmt); oci_close($conn); ?> ]]> -
-
-
- &oci.datatypes; - - oci_fetch_all returns &false; in case of error. - - - - In PHP versions before 5.0.0 you must use ocifetchstatement instead. - This name still can be used, it was left as alias of - oci_fetch_all for downwards compatability. - This, however, is deprecated and not recommended. - - -
-
+
+
+
+ &oci.datatypes; + + oci_fetch_all returns &false; in case of error. + + + + In PHP versions before 5.0.0 you must use ocifetchstatement instead. + This name still can be used, it was left as alias of + oci_fetch_all for downwards compatability. + This, however, is deprecated and not recommended. + + +
+
- - - oci_fetch_array - Returns the next row from the result data as an associative or - numeric array, or both - - - - Description - - arrayoci_fetch_array - resourcestatement - intmode - - - Returns an array, which corresponds to the next result row or &false; in - case of error or there are no more rows in the result. - - - oci_fetch_array returns an array with both - associative and numeric indices. - - &database.fetch-null; - - An optional second parameter can be any combination of the following - constants: - - - OCI_BOTH - return an array with both associative - and numeric indices (the same as OCI_ASSOC - + OCI_NUM). This is the default behavior. - - - OCI_ASSOC - return an associative array - (as oci_fetch_assoc works). - - - OCI_NUM - return a numeric array, - (as oci_fetch_row works). - - - OCI_RETURN_NULLS - create empty elements - for the &null; fields. - - - OCI_RETURN_LOBS - return the value of a LOB - of the descriptor. - - - Default mode is OCI_BOTH. - - - It should be mentioned here, that oci_fetch_array - is insignificantly slower, than - oci_fetch_row, but much more handy. - - - - Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too. - - - - - <function>oci_fetch_array</function> with <constant>OCI_BOTH</constant> example - + + + + oci_fetch_array + Returns the next row from the result data as an associative or + numeric array, or both + + + + Description + + arrayoci_fetch_array + resourcestatement + intmode + + + Returns an array, which corresponds to the next result row or &false; in + case of error or there are no more rows in the result. + + + oci_fetch_array returns an array with both + associative and numeric indices. + + &database.fetch-null; + + An optional second parameter can be any combination of the following + constants: + + + OCI_BOTH - return an array with both associative + and numeric indices (the same as OCI_ASSOC + + OCI_NUM). This is the default behavior. + + + OCI_ASSOC - return an associative array + (as oci_fetch_assoc works). + + + OCI_NUM - return a numeric array, + (as oci_fetch_row works). + + + OCI_RETURN_NULLS - create empty elements + for the &null; fields. + + + OCI_RETURN_LOBS - return the value of a LOB + of the descriptor. + + + Default mode is OCI_BOTH. + + + It should be mentioned here, that oci_fetch_array + is insignificantly slower, than + oci_fetch_row, but much more handy. + + + + Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too. + + + + + <function>oci_fetch_array</function> with <constant>OCI_BOTH</constant> example + ]]> - - - - - - <function>oci_fetch_array</function> with - <constant>OCI_NUM</constant> example - + + + + + + <function>oci_fetch_array</function> with + <constant>OCI_NUM</constant> example + ]]> - - - - - - <function>oci_fetch_array</function> with - <constant>OCI_ASSOC</constant> example - + + + + + + <function>oci_fetch_array</function> with + <constant>OCI_ASSOC</constant> example + ]]> - - - - - - <function>oci_fetch_array</function> with - <constant>OCI_RETURN_LOBS</constant> example - + + + + + + <function>oci_fetch_array</function> with + <constant>OCI_RETURN_LOBS</constant> example + ]]> - - - - &oci.datatypes; - - See also oci_fetch_assoc, - oci_fetch_object, - oci_fetch_row and - oci_fetch_all. - - - + + + + &oci.datatypes; + + See also oci_fetch_assoc, + oci_fetch_object, + oci_fetch_row and + oci_fetch_all. + + + - - - oci_fetch_assoc - Returns the next row from the result data as an associative array - - - Description - - arrayoci_fetch_assoc - resourcestatement - - - oci_fetch_assoc returns the next row from the result - data as an associative array (identical to - oci_fetch_array call with - OCI_ASSOC flag). - - &database.fetch-null; - - A subsequent call to oci_fetch_assoc will return - the next row or &false; if there are no more rows. - - - - Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too. - - - &oci.datatypes; - - See also oci_fetch_array, - oci_fetch_object, - oci_fetch_row and - oci_fetch_all. - - - + + + + oci_fetch_assoc + Returns the next row from the result data as an associative array + + + Description + + arrayoci_fetch_assoc + resourcestatement + + + oci_fetch_assoc returns the next row from the result + data as an associative array (identical to + oci_fetch_array call with + OCI_ASSOC flag). + + &database.fetch-null; + + A subsequent call to oci_fetch_assoc will return + the next row or &false; if there are no more rows. + + + + Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too. + + + &oci.datatypes; + + See also oci_fetch_array, + oci_fetch_object, + oci_fetch_row and + oci_fetch_all. + + + - - - oci_fetch_object - Returns the next row from the result data as an object - - - Description - - objectoci_fetch_object - resourcestatement - - - oci_fetch_object returns the next row from the result data as - an object, which attributes correspond to fields in statement. - - &database.fetch-null; - - Subsequent calls to oci_fetch_object will return the - next row from the result or &false; if there are no more rows. - - - - Oracle returns all field names in uppercase and attributes' names in the result object will be in uppercase as well. - - - &oci.datatypes; - - See also oci_fetch_array, - oci_fetch_assoc, - oci_fetch_row and - oci_fetch_all. - - - + + + + oci_fetch_object + Returns the next row from the result data as an object + + + Description + + objectoci_fetch_object + resourcestatement + + + oci_fetch_object returns the next row from the result data as + an object, which attributes correspond to fields in statement. + + &database.fetch-null; + + Subsequent calls to oci_fetch_object will return the + next row from the result or &false; if there are no more rows. + + + + Oracle returns all field names in uppercase and attributes' names in the result object will be in uppercase as well. + + + &oci.datatypes; + + See also oci_fetch_array, + oci_fetch_assoc, + oci_fetch_row and + oci_fetch_all. + + + - - - oci_fetch_row - Returns the next row from the result data as a numeric array - - - Description - - arrayoci_fetch_row - resourcestatement - - - Calling oci_fetch_row is identical to - oci_fetch_array with - OCI_NUM flag and returns the next row from the result - data as a numeric array. - - &database.fetch-null; - - Subsequent calls to oci_fetch_row will return the - next row from the result data or &false; if there are no more rows. - - &oci.datatypes; - - See also oci_fetch_array, - oci_fetch_object, - oci_fetch_assoc and - oci_fetch_all. - - - + + + + oci_fetch_row + Returns the next row from the result data as a numeric array + + + Description + + arrayoci_fetch_row + resourcestatement + + + Calling oci_fetch_row is identical to + oci_fetch_array with + OCI_NUM flag and returns the next row from the result + data as a numeric array. + + &database.fetch-null; + + Subsequent calls to oci_fetch_row will return the + next row from the result data or &false; if there are no more rows. + + &oci.datatypes; + + See also oci_fetch_array, + oci_fetch_object, + oci_fetch_assoc and + oci_fetch_all. + + + - - - oci_fetch - Fetches the next row into result-buffer - - - Description - - booloci_fetch - resourcestatement - - - oci_fetch fetches the next row (for SELECT - statements) into the internal result-buffer. - - - &return.success; - - &oci.datatypes; - - - In PHP versions before 5.0.0 you must use ocifetch instead. - This name still can be used, it was left as alias of - oci_fetch for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_fetch + Fetches the next row into result-buffer + + + Description + + booloci_fetch + resourcestatement + + + oci_fetch fetches the next row (for SELECT + statements) into the internal result-buffer. + + + &return.success; + + &oci.datatypes; + + + In PHP versions before 5.0.0 you must use ocifetch instead. + This name still can be used, it was left as alias of + oci_fetch for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_field_is_null - Checks if the field is &null; - - - Description - - booloci_field_is_null - resourcestmt - mixedfield - - - oci_field_is_null returns &true; if field - field from the statement is - &null;. Parameter field could be a field's index - or a field's name (uppercased). - - - - In PHP versions before 5.0.0 you must use ocicolumnisnull instead. - This name still can be used, it was left as alias of - oci_field_is_null for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_field_is_null + Checks if the field is &null; + + + Description + + booloci_field_is_null + resourcestmt + mixedfield + + + oci_field_is_null returns &true; if field + field from the statement is + &null;. Parameter field could be a field's index + or a field's name (uppercased). + + + + In PHP versions before 5.0.0 you must use ocicolumnisnull instead. + This name still can be used, it was left as alias of + oci_field_is_null for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_field_name - Returns the name of a field from the statement - - - Description - - stringoci_field_name - resourcestatement - intfield - - - oci_field_name returns the name of the field - corresponding to the field number (1-based). - - - - <function>oci_field_name</function> example - + + + + oci_field_name + Returns the name of a field from the statement + + + Description + + stringoci_field_name + resourcestatement + intfield + + + oci_field_name returns the name of the field + corresponding to the field number (1-based). + + + + <function>oci_field_name</function> example + "; echo ""; echo "Name"; echo "Type"; echo "Length"; echo ""; - + $ncols = oci_num_fields($stmt); - + for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt, $i); $column_type = oci_field_type($stmt, $i); $column_size = oci_field_size($stmt, $i); - + echo ""; echo "$column_name"; echo "$column_type"; echo "$column_size"; echo ""; } - - echo "\n"; - oci_free_statement($stmt); - oci_close($conn); -?> + + echo "\n"; + oci_free_statement($stmt); + oci_close($conn); +?> ]]> - - - - - - In PHP versions before 5.0.0 you must use ocicolumnname instead. - This name still can be used, it was left as alias of - oci_field_name for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_num_fields, - oci_field_type, - and oci_field_size. - - - + + + + + + In PHP versions before 5.0.0 you must use ocicolumnname instead. + This name still can be used, it was left as alias of + oci_field_name for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_num_fields, + oci_field_type, + and oci_field_size. + + + - - - oci_field_precision - Tell the precision of a field - - - Description - - intoci_field_precision - resourcestatement - intfield - - - Returns precision of the field with field index - (1-based). - - - For FLOAT columns, precision is nonzero and scale is -127. - If precision is 0, then column is NUMBER. Else it's - NUMBER(precision, scale). - - - - In PHP versions before 5.0.0 you must use ocicolumnprecision instead. - This name still can be used, it was left as alias of - oci_field_precision for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_field_scale and - oci_field_type. - - - + + + + oci_field_precision + Tell the precision of a field + + + Description + + intoci_field_precision + resourcestatement + intfield + + + Returns precision of the field with field index + (1-based). + + + For FLOAT columns, precision is nonzero and scale is -127. + If precision is 0, then column is NUMBER. Else it's + NUMBER(precision, scale). + + + + In PHP versions before 5.0.0 you must use ocicolumnprecision instead. + This name still can be used, it was left as alias of + oci_field_precision for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_field_scale and + oci_field_type. + + + - - - oci_field_scale - Tell the scale of the field - - - Description - - intoci_field_scale - resourcestatement - intfield - + + + + oci_field_scale + Tell the scale of the field + + + Description + + intoci_field_scale + resourcestatement + intfield + + + Returns scale of the column with field index + (1-based) or &false; if there is no such field. + + + For FLOAT columns, precision is nonzero and scale is -127. + If precision is 0, then column is NUMBER. Else it's + NUMBER(precision, scale). + + - Returns scale of the column with field index - (1-based) or &false; if there is no such field. + In PHP versions before 5.0.0 you must use ocicolumnscale instead. + This name still can be used, it was left as alias of + oci_field_scale for downwards compatability. + This, however, is deprecated and not recommended. - - For FLOAT columns, precision is nonzero and scale is -127. - If precision is 0, then column is NUMBER. Else it's - NUMBER(precision, scale). - - - - In PHP versions before 5.0.0 you must use ocicolumnscale instead. - This name still can be used, it was left as alias of - oci_field_scale for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_field_precision and - oci_field_type. - - - + + + See also oci_field_precision and + oci_field_type. + + + - - - oci_field_size - Returns field's size - - - Description - - intoci_field_size - resourcestmt - mixedfield - - - oci_field_size returns the size of a field in - bytes. Value of field parameter can be the field's - index (1-based) or it's name. - - - - <function>oci_field_size</function>example - + + + + oci_field_size + Returns field's size + + + Description + + intoci_field_size + resourcestmt + mixedfield + + + oci_field_size returns the size of a field in + bytes. Value of field parameter can be the field's + index (1-based) or it's name. + + + + <function>oci_field_size</function>example + "; echo ""; echo "Name"; echo "Type"; echo "Length"; echo ""; - + $ncols = oci_num_fields($stmt); - + for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt, $i); $column_type = oci_field_type($stmt, $i); @@ -46,30 +46,30 @@ echo "$column_size"; echo ""; } - + echo ""; - - oci_free_statement($stmt); - oci_close($conn); -?> + + oci_free_statement($stmt); + oci_close($conn); +?> ]]> - - - - - - In PHP versions before 5.0.0 you must use ocicolumnsize instead. - This name still can be used, it was left as alias of - oci_field_size for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_num_fields and - oci_field_name. - - - + + + + + + In PHP versions before 5.0.0 you must use ocicolumnsize instead. + This name still can be used, it was left as alias of + oci_field_size for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_num_fields and + oci_field_name. + + + - - - oci_field_type_raw - Tell the raw Oracle data type of the field - - - Description - - intoci_field_type_raw - resourcestatement - intfield - - - oci_field_type_raw returns Oracle's raw data type of the - field. - - - - In PHP versions before 5.0.0 you must use ocicolumntyperaw instead. - This name still can be used, it was left as alias of - oci_field_type_raw for downwards compatability. - This, however, is deprecated and not recommended. - - - - However, if you want to get field's type, then - oci_field_type will suit you better. See - oci_field_type for additional information. - - - + + + + oci_field_type_raw + Tell the raw Oracle data type of the field + + + Description + + intoci_field_type_raw + resourcestatement + intfield + + + oci_field_type_raw returns Oracle's raw data type of the + field. + + + + In PHP versions before 5.0.0 you must use ocicolumntyperaw instead. + This name still can be used, it was left as alias of + oci_field_type_raw for downwards compatability. + This, however, is deprecated and not recommended. + + + + However, if you want to get field's type, then + oci_field_type will suit you better. See + oci_field_type for additional information. + + + - - - oci_field_type - Returns field's data type - - - Description - - mixedoci_field_type - resourcestmt - intfield - - - oci_field_type returns a field's data type. - Parameter field is an index of the field in the - statement (1-based). - - - - <function>oci_field_type</function> example - + + + + oci_field_type + Returns field's data type + + + Description + + mixedoci_field_type + resourcestmt + intfield + + + oci_field_type returns a field's data type. + Parameter field is an index of the field in the + statement (1-based). + + + + <function>oci_field_type</function> example + "; +"; +echo ""; +echo "Name"; +echo "Type"; +echo "Length"; +echo ""; + +$ncols = oci_num_fields($stmt); + +for ($i = 1; $i <= $ncols; $i++) { + $column_name = oci_field_name($stmt, $i); + $column_type = oci_field_type($stmt, $i); + $column_size = oci_field_size($stmt, $i); + echo ""; - echo "Name"; - echo "Type"; - echo "Length"; + echo "$column_name"; + echo "$column_type"; + echo "$column_size"; echo ""; - - $ncols = oci_num_fields($stmt); - - for ($i = 1; $i <= $ncols; $i++) { - $column_name = oci_field_name($stmt, $i); - $column_type = oci_field_type($stmt, $i); - $column_size = oci_field_size($stmt, $i); - - echo ""; - echo "$column_name"; - echo "$column_type"; - echo "$column_size"; - echo ""; - } - - echo "\n"; - - oci_free_statement($stmt); - oci_close($conn); -?> +} + +echo "\n"; + +oci_free_statement($stmt); +oci_close($conn); +?> ]]> - - - - - - In PHP versions before 5.0.0 you must use ocicolumntype instead. - This name still can be used, it was left as alias of - oci_field_type for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_num_fields, - oci_field_name, - and oci_field_size. - - - + + + + + + In PHP versions before 5.0.0 you must use ocicolumntype instead. + This name still can be used, it was left as alias of + oci_field_type for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_num_fields, + oci_field_name, + and oci_field_size. + + + + - - oci_free_statement - - Frees all resources associated with statement or cursor - - - - Description - - booloci_free_statement - resourcestatement - - - oci_free_statement frees resources associated with - Oracle's cursor or statement, which was received from as a result of - oci_parse or obtained from Oracle. - - - &return.success; - - - + + oci_free_statement + Frees all resources associated with statement or cursor + + + Description + + booloci_free_statement + resourcestatement + + + oci_free_statement frees resources associated with + Oracle's cursor or statement, which was received from as a result of + oci_parse or obtained from Oracle. + + + &return.success; + + + - - - oci_internal_debug - Enables or disables internal debug output - - - Description - - voidoci_internal_debug - intonoff - - - oci_internal_debug enables or disables internal debug - output. Set onoff to 0 to turn debug - output off or 1 to turn it on. - - - - In PHP versions before 5.0.0 you must use ociinternaldebug instead. - This name still can be used, it was left as alias of - oci_internal_debug for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_internal_debug + Enables or disables internal debug output + + + Description + + voidoci_internal_debug + intonoff + + + oci_internal_debug enables or disables internal debug + output. Set onoff to 0 to turn debug + output off or 1 to turn it on. + + + + In PHP versions before 5.0.0 you must use ociinternaldebug instead. + This name still can be used, it was left as alias of + oci_internal_debug for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_lob_copy - Copies large object - - - Description - - booloci_lob_copy - OCI-Loblob_to - OCI-Loblob_from - intlength - - - Copies a large object or a part of a large object to another large object. - Parameter length indicates the length of data to - be copied. Old LOB-recipient data will be overwritten. - - - If you need to copy a particular part of a LOB to a particular position of - a LOB, use oci_lob_seek to move LOB internal pointers. - - - &return.success; - - - + + + + oci_lob_copy + Copies large object + + + Description + + booloci_lob_copy + OCI-Loblob_to + OCI-Loblob_from + intlength + + + Copies a large object or a part of a large object to another large object. + Parameter length indicates the length of data to + be copied. Old LOB-recipient data will be overwritten. + + + If you need to copy a particular part of a LOB to a particular position of + a LOB, use oci_lob_seek to move LOB internal pointers. + + + &return.success; + + + + - - oci_lob_is_equal - Compares two LOB/FILE locators for equality - - - Description - - booloci_lob_is_equal - OCI-Loblob1 - OCI-Loblob2 - - - Compares two LOB/FILE locators. Returns &true; if these objects are equal - and &false; otherwise. - - - + + oci_lob_is_equal + Compares two LOB/FILE locators for equality + + + Description + + booloci_lob_is_equal + OCI-Loblob1 + OCI-Loblob2 + + + Compares two LOB/FILE locators. Returns &true; if these objects are equal + and &false; otherwise. + + + + OCI-Lob->saveFile @@ -13,6 +13,7 @@ oci_lob_import. + + OCI-Lob->writeToFile @@ -13,6 +13,7 @@ oci_lob_export. + - - - oci_new_collection - Allocates new collection object - - - Description - - OCI-Collectionoci_new_collection - resourceconnection - stringtdo - stringschema - - - Allocates a new collection object. Parameter tdo - should be a valid named type (uppercase). The third, optional parameter - schema should point to the scheme, where the - named type was created. oci_new_collection uses - the name of the current user as the default value of schema. - - - oci_new_collection returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocinewcollection instead. - This name still can be used, it was left as alias of - oci_new_collection for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_new_collection + Allocates new collection object + + + Description + + OCI-Collectionoci_new_collection + resourceconnection + stringtdo + stringschema + + + Allocates a new collection object. Parameter tdo + should be a valid named type (uppercase). The third, optional parameter + schema should point to the scheme, where the + named type was created. oci_new_collection uses + the name of the current user as the default value of schema. + + + oci_new_collection returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocinewcollection instead. + This name still can be used, it was left as alias of + oci_new_collection for downwards compatability. + This, however, is deprecated and not recommended. + + + + + - - oci_new_connect - Establishes a new connection to the Oracle server - - - Description - - resourceoci_new_connect - stringusername - stringpassword - stringdb - stringcharset - intsession_mode - - - oci_new_connect establishes a new connection to - an Oracle server and logs on. Unlike oci_connect and - oci_pconnect, oci_new_connect - does not cache connections and will always return a brand-new freshly - opened connection handle. This is useful if your application needs - transactional isolation between two sets of queries. - - - The optional third parameter can either contain the name - of the local Oracle instance or the name of the entry in - tnsnames.ora. If the third parameter is not specified, - PHP uses environment variables ORACLE_SID and - TWO_TASK to determine the name of local Oracle - instance and location of tnsnames.ora accordingly. - - - Parameter session_mode is available since version - 1.1 and accepts the following values: OCI_DEFAULT, - OCI_SYSOPER and OCI_SYSDBA. - If either OCI_SYSOPER or - OCI_SYSDBA were specified, - oci_new_connect will try to establish privileged - connection using external credentials. Privileged connections are - disabled by default. To enable them you need to set oci8.privileged_connect - to On. - - - - If you're using PHP with Oracle Instant Client, you can use easy connect - naming method described here: - &url.oracle.oic.connect;. - Basically this means you can specify "//db_host[:port]/database_name" - as database name. But if you want to use the old way of naming you - must set either ORACLE_HOME or - TNS_ADMIN. - - - &oci.charset; - - The following demonstrates how you can separate connections. - - <function>oci_new_connect</function> example - + + oci_new_connect + Establishes a new connection to the Oracle server + + + Description + + resourceoci_new_connect + stringusername + stringpassword + stringdb + stringcharset + intsession_mode + + + oci_new_connect establishes a new connection to + an Oracle server and logs on. Unlike oci_connect and + oci_pconnect, oci_new_connect + does not cache connections and will always return a brand-new freshly + opened connection handle. This is useful if your application needs + transactional isolation between two sets of queries. + + + The optional third parameter can either contain the name + of the local Oracle instance or the name of the entry in + tnsnames.ora. If the third parameter is not specified, + PHP uses environment variables ORACLE_SID and + TWO_TASK to determine the name of local Oracle + instance and location of tnsnames.ora accordingly. + + + Parameter session_mode is available since version + 1.1 and accepts the following values: OCI_DEFAULT, + OCI_SYSOPER and OCI_SYSDBA. + If either OCI_SYSOPER or + OCI_SYSDBA were specified, + oci_new_connect will try to establish privileged + connection using external credentials. Privileged connections are + disabled by default. To enable them you need to set oci8.privileged_connect + to On. + + + + If you're using PHP with Oracle Instant Client, you can use easy connect + naming method described here: + &url.oracle.oic.connect;. + Basically this means you can specify "//db_host[:port]/database_name" + as database name. But if you want to use the old way of naming you + must set either ORACLE_HOME or + TNS_ADMIN. + + + &oci.charset; + + The following demonstrates how you can separate connections. + + <function>oci_new_connect</function> example +
";
@@ -68,7 +68,7 @@ $db = "";
 $c1 = oci_connect("scott", "tiger", $db);
 $c2 = oci_new_connect("scott", "tiger", $db);
 
-function create_table($conn) 
+function create_table($conn)
 {
   $stmt = oci_parse($conn, "create table scott.hallo (test
 varchar2(64))");
@@ -76,41 +76,41 @@ varchar2(64))");
   echo $conn . " created table\n\n";
 }
 
-function drop_table($conn) 
+function drop_table($conn)
 {
   $stmt = oci_parse($conn, "drop table scott.hallo");
   oci_execute($stmt);
   echo $conn . " dropped table\n\n";
 }
 
-function insert_data($conn) 
+function insert_data($conn)
 {
-  $stmt = oci_parse($conn, "insert into scott.hallo 
+  $stmt = oci_parse($conn, "insert into scott.hallo
             values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
   oci_execute($stmt, OCI_DEFAULT);
   echo $conn . " inserted hallo\n\n";
 }
 
-function delete_data($conn) 
+function delete_data($conn)
 {
   $stmt = oci_parse($conn, "delete from scott.hallo");
   oci_execute($stmt, OCI_DEFAULT);
   echo $conn . " deleted hallo\n\n";
 }
 
-function commit($conn) 
+function commit($conn)
 {
   oci_commit($conn);
   echo $conn . " committed\n\n";
 }
 
-function rollback($conn) 
+function rollback($conn)
 {
   oci_rollback($conn);
   echo $conn . " rollback\n\n";
 }
 
-function select_data($conn) 
+function select_data($conn)
 {
   $stmt = oci_parse($conn, "select * from scott.hallo");
   oci_execute($stmt, OCI_DEFAULT);
@@ -124,23 +124,23 @@ function select_data($conn)
 create_table($c1);
 insert_data($c1);
 
-select_data($c1);   
-select_data($c2);   
+select_data($c1);
+select_data($c2);
 
-rollback($c1);      
+rollback($c1);
 
-select_data($c1);   
-select_data($c2);   
+select_data($c1);
+select_data($c2);
 
-insert_data($c2);   
-commit($c2);        
+insert_data($c2);
+commit($c2);
 
-select_data($c1);   
+select_data($c1);
 
-delete_data($c1);   
-select_data($c1);   
-select_data($c2);   
-commit($c1);        
+delete_data($c1);
+select_data($c1);
+select_data($c2);
+commit($c1);
 
 select_data($c1);
 select_data($c2);
@@ -149,26 +149,26 @@ drop_table($c1);
 echo "
"; ?> ]]> -
-
-
- - oci_new_connect returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocinlogon instead. - This name still can be used, it was left as alias of - oci_new_connect for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_connect and - oci_pconnect. - -
-
+ + + + + oci_new_connect returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocinlogon instead. + This name still can be used, it was left as alias of + oci_new_connect for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_connect and + oci_pconnect. + + + - - - oci_new_cursor - Allocates and returns a new cursor (statement handle) - - - Description - - resourceoci_new_cursor - resourceconnection - - - oci_new_cursor allocates a new statement handle on - the specified connection. - - - - Using REF CURSOR in an Oracle's stored procedure - + + + + oci_new_cursor + Allocates and returns a new cursor (statement handle) + + + Description + + resourceoci_new_cursor + resourceconnection + + + oci_new_cursor allocates a new statement handle on + the specified connection. + + + + Using REF CURSOR in an Oracle's stored procedure + ]]> - - - - - - Using REF CURSOR in an Oracle's select statement - + + + + + + Using REF CURSOR in an Oracle's select statement + "; $conn = oci_connect("scott", "tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . @@ -82,22 +82,22 @@ oci_free_statement($stmt); oci_close($conn); ?> ]]> - - - - - oci_new_cursor returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocinewcursor instead. - This name still can be used, it was left as alias of - oci_new_cursor for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + oci_new_cursor returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocinewcursor instead. + This name still can be used, it was left as alias of + oci_new_cursor for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_new_descriptor - Initializes a new empty LOB or FILE descriptor - - - Description - - OCI-Loboci_new_descriptor - resourceconnection - inttype - - - oci_new_descriptor allocates resources to hold - descriptor or LOB locator. Valid values for type - are: OCI_D_FILE, - OCI_D_LOB and OCI_D_ROWID. - - - - <function>oci_new_descriptor</function> example - + + + + oci_new_descriptor + Initializes a new empty LOB or FILE descriptor + + + Description + + OCI-Loboci_new_descriptor + resourceconnection + inttype + + + oci_new_descriptor allocates resources to hold + descriptor or LOB locator. Valid values for type + are: OCI_D_FILE, + OCI_D_LOB and OCI_D_ROWID. + + + + <function>oci_new_descriptor</function> example + +?> ]]> - - + +
// see also the features section on file upload, // if you would like to use secure uploads - + $conn = oci_connect($user, $password); $lob = oci_new_descriptor($conn, OCI_D_LOB); - $stmt = oci_parse($conn, "insert into $table (id, the_blob) + $stmt = oci_parse($conn, "insert into $table (id, the_blob) values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); oci_bind_by_name($stmt, ':the_blob', $lob, -1, OCI_B_BLOB); oci_execute($stmt, OCI_DEFAULT); @@ -93,15 +93,15 @@ Upload file:
} ?> ]]> -
-
- - <function>oci_new_descriptor</function> example - + + + + <function>oci_new_descriptor</function> example + = 4.0.6). + * parameters (PHP 4 >= 4.0.6). * Example PL/SQL stored procedure signature is: * * PROCEDURE save_data @@ -124,22 +124,22 @@ Upload file:
oci_free_statement($stmt); ?> ]]> -
-
-
- - oci_new_descriptor returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocinewdescriptor instead. - This name still can be used, it was left as alias of - oci_new_descriptor for downwards compatability. - This, however, is deprecated and not recommended. - - -
-
+
+
+
+ + oci_new_descriptor returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocinewdescriptor instead. + This name still can be used, it was left as alias of + oci_new_descriptor for downwards compatability. + This, however, is deprecated and not recommended. + + +
+
- - - oci_num_fields - - Returns the number of result columns in a statement - - - - Description - - intoci_num_fields - resourcestatement - - - oci_num_fields returns the number of columns in the - statement. - - - - <function>oci_num_fields</function> example - + + + + oci_num_fields + Returns the number of result columns in a statement + + + Description + + intoci_num_fields + resourcestatement + + + oci_num_fields returns the number of columns in the + statement. + + + + <function>oci_num_fields</function> example + \n"; +\n"; $conn = oci_connect("scott", "tiger"); $stmt = oci_parse($conn, "select * from emp"); - + oci_execute($stmt); - + while (oci_fetch($stmt)) { - echo "\n"; + echo "\n"; $ncols = oci_num_fields($stmt); for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt, $i); @@ -39,29 +37,29 @@ } echo "\n"; } - - oci_free_statement($stmt); - oci_close($conn); - + + oci_free_statement($stmt); + oci_close($conn); + echo ""; -?> +?> ]]> - - - - - oci_num_fields returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocinumcols instead. - This name still can be used, it was left as alias of - oci_num_fields for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + oci_num_fields returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocinumcols instead. + This name still can be used, it was left as alias of + oci_num_fields for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_num_rows - Returns number of rows affected during statement execution - - - Description - - intoci_num_rows - resourcestmt - - - oci_num_rows returns number of rows affected during statement execution. - - - - This function does not return number of rows selected! - For SELECT statements this function will return the number of rows, that were - fetched to the buffer with oci_fetch* functions. - - - - - <function>oci_num_rows</function> example - + + + + oci_num_rows + Returns number of rows affected during statement execution + + + Description + + intoci_num_rows + resourcestmt + + + oci_num_rows returns number of rows affected during statement execution. + + + + This function does not return number of rows selected! + For SELECT statements this function will return the number of rows, that were + fetched to the buffer with oci_fetch* functions. + + + + + <function>oci_num_rows</function> example + "; $conn = oci_connect("scott", "tiger"); - + $stmt = oci_parse($conn, "create table emp2 as select * from emp"); oci_execute($stmt); echo oci_num_rows($stmt) . " rows inserted.
"; oci_free_statement($stmt); - + $stmt = oci_parse($conn, "delete from emp2"); oci_execute($stmt, OCI_DEFAULT); echo oci_num_rows($stmt) . " rows deleted.
"; oci_commit($conn); oci_free_statement($stmt); - + $stmt = oci_parse($conn, "drop table emp2"); oci_execute($stmt); oci_free_statement($stmt); - + oci_close($conn); echo ""; ?> ]]> -
-
-
- - oci_num_rows returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocirowcount instead. - This name still can be used, it was left as alias of - oci_num_rows for downwards compatability. - This, however, is deprecated and not recommended. - - -
-
+
+
+
+ + oci_num_rows returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocirowcount instead. + This name still can be used, it was left as alias of + oci_num_rows for downwards compatability. + This, however, is deprecated and not recommended. + + +
+
- - - oci_parse - Prepares Oracle statement for execution - - - Description - - resourceoci_parse - resourceconnection - stringquery - - - oci_parse prepares the query - using connection and returns the statement - identifier, which can be used with - oci_bind_by_name, oci_execute - and other functions. - - - - This function does not validate - query. The only way to find out if - query is valid SQL or PL/SQL statement - is to - execute it. - - - - oci_parse returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ociparse instead. - This name still can be used, it was left as alias of - oci_parse for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_parse + Prepares Oracle statement for execution + + + Description + + resourceoci_parse + resourceconnection + stringquery + + + oci_parse prepares the query + using connection and returns the statement + identifier, which can be used with + oci_bind_by_name, oci_execute + and other functions. + + + + This function does not validate + query. The only way to find out if + query is valid SQL or PL/SQL statement - is to + execute it. + + + + oci_parse returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ociparse instead. + This name still can be used, it was left as alias of + oci_parse for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_password_change - Changes password of Oracle's user - - - Description - - booloci_password_change - resourceconnection - stringusername - stringold_password - stringnew_password - - - resourceoci_password_change - stringdbname - stringusername - stringold_password - stringnew_password - - - Changes password for user with username. - Parameters old_password and - new_password should indicate old and new passwords - respectively. - - - - The second oci_password_change syntax is available - since version 1.1. - - - - &return.success; - - - - In PHP versions before 5.0.0 you must use ocipasswordchange instead. - This name still can be used, it was left as alias of - oci_password_change for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + oci_password_change + Changes password of Oracle's user + + + Description + + booloci_password_change + resourceconnection + stringusername + stringold_password + stringnew_password + + + resourceoci_password_change + stringdbname + stringusername + stringold_password + stringnew_password + + + Changes password for user with username. + Parameters old_password and + new_password should indicate old and new passwords + respectively. + + + + The second oci_password_change syntax is available + since version 1.1. + + + + &return.success; + + + + In PHP versions before 5.0.0 you must use ocipasswordchange instead. + This name still can be used, it was left as alias of + oci_password_change for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_pconnect - Connect to an Oracle database using a persistent connection - - - Description - - resourceoci_pconnect - stringusername - stringpassword - stringdb - stringcharset - intsession_mode - - - oci_pconnect creates a persistent connection - to an Oracle server and logs on. Persistent connections are cached - and re-used between requests, resulting in reduced overhead on each - page load; a typical PHP application will have a single persistent - connection open against an Oracle server per Apache child process - (or PHP FastCGI/CGI process). See the Persistent Database - Connections section for more information. - - - - Starting with version 1.1 of the oci8 extension, the lifetime and - maximum amount of persistent Oracle connections can be tuned by setting - the following configuration values: oci8.persistent_timeout, - oci8.ping_interval and - oci8.max_persistent. - - - - The optional third parameter can either contain - the name of the local Oracle instance or the name of the entry in - tnsnames.ora. If the third parameter is not specified, - PHP uses environment variables ORACLE_SID and - TWO_TASK to determine the name of local Oracle - instance and location of tnsnames.ora accordingly. - - - Parameter session_mode is available since version - 1.1 and accepts the following values: OCI_DEFAULT, - OCI_SYSOPER and OCI_SYSDBA. - If either OCI_SYSOPER or - OCI_SYSDBA were specified, - oci_connect will try to establish privileged - connection using external credentials. Privileged connections are - disabled by default. To enable them you need to set oci8.privileged_connect - to On. - - - - If you're using PHP with Oracle Instant Client, you can use easy connect - naming method described here: - &url.oracle.oic.connect;. - Basically this means you can specify "//db_host[:port]/database_name" - as database name. But if you want to use the old way of naming you - must set either ORACLE_HOME or - TNS_ADMIN. - - - &oci.charset; - - oci_pconnect returns connection identifier or - &false; on error. - - - - In PHP versions before 5.0.0 you must use ociplogon instead. - This name still can be used, it was left as alias of - oci_pconnect for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_connect and - oci_new_connect. - - - + + + + oci_pconnect + Connect to an Oracle database using a persistent connection + + + Description + + resourceoci_pconnect + stringusername + stringpassword + stringdb + stringcharset + intsession_mode + + + oci_pconnect creates a persistent connection + to an Oracle server and logs on. Persistent connections are cached + and re-used between requests, resulting in reduced overhead on each + page load; a typical PHP application will have a single persistent + connection open against an Oracle server per Apache child process + (or PHP FastCGI/CGI process). See the Persistent Database + Connections section for more information. + + + + Starting with version 1.1 of the oci8 extension, the lifetime and + maximum amount of persistent Oracle connections can be tuned by setting + the following configuration values: oci8.persistent_timeout, + oci8.ping_interval and + oci8.max_persistent. + + + + The optional third parameter can either contain + the name of the local Oracle instance or the name of the entry in + tnsnames.ora. If the third parameter is not specified, + PHP uses environment variables ORACLE_SID and + TWO_TASK to determine the name of local Oracle + instance and location of tnsnames.ora accordingly. + + + Parameter session_mode is available since version + 1.1 and accepts the following values: OCI_DEFAULT, + OCI_SYSOPER and OCI_SYSDBA. + If either OCI_SYSOPER or + OCI_SYSDBA were specified, + oci_connect will try to establish privileged + connection using external credentials. Privileged connections are + disabled by default. To enable them you need to set oci8.privileged_connect + to On. + + + + If you're using PHP with Oracle Instant Client, you can use easy connect + naming method described here: + &url.oracle.oic.connect;. + Basically this means you can specify "//db_host[:port]/database_name" + as database name. But if you want to use the old way of naming you + must set either ORACLE_HOME or + TNS_ADMIN. + + + &oci.charset; + + oci_pconnect returns connection identifier or + &false; on error. + + + + In PHP versions before 5.0.0 you must use ociplogon instead. + This name still can be used, it was left as alias of + oci_pconnect for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_connect and + oci_new_connect. + + + - - - oci_result - Returns field's value from the fetched row - - - Description - - mixedoci_result - resourcestatement - mixedfield - - - oci_result returns the data from the field - field in the current row, fetched by - oci_fetch. oci_result returns - everything as strings except for abstract types (ROWIDs, LOBs and FILEs). - oci_result returns &false; on error. - - - You can either use the column number (1-based) or the column name (in - uppercase) for the field parameter. - - - - In PHP versions before 5.0.0 you must use ociresult instead. - This name still can be used, it was left as alias of - oci_result for downwards compatability. - This, however, is deprecated and not recommended. - - - &oci.datatypes; - - See also oci_fetch_array, - oci_fetch_assoc, - oci_fetch_object, - oci_fetch_row and - oci_fetch_all. - - - + + + + oci_result + Returns field's value from the fetched row + + + Description + + mixedoci_result + resourcestatement + mixedfield + + + oci_result returns the data from the field + field in the current row, fetched by + oci_fetch. oci_result returns + everything as strings except for abstract types (ROWIDs, LOBs and FILEs). + oci_result returns &false; on error. + + + You can either use the column number (1-based) or the column name (in + uppercase) for the field parameter. + + + + In PHP versions before 5.0.0 you must use ociresult instead. + This name still can be used, it was left as alias of + oci_result for downwards compatability. + This, however, is deprecated and not recommended. + + + &oci.datatypes; + + See also oci_fetch_array, + oci_fetch_assoc, + oci_fetch_object, + oci_fetch_row and + oci_fetch_all. + + + - - - oci_rollback - Rolls back outstanding transaction - - - Description - - booloci_rollback - resourceconnection - - - oci_rollback rolls back all outstanding statements - for Oracle connection connection. - - - &return.success; - - - - Transactions are automatically rolled back when you close - the connection, or when the script ends, whichever is soonest. You - need to explicitly call oci_commit to commit - the transaction, or oci_rollback to abort it. - - - - - In PHP versions before 5.0.0 you must use ocirollback instead. - This name still can be used, it was left as alias of - oci_rollback for downwards compatability. - This, however, is deprecated and not recommended. - - - - See also oci_commit. - - - + + + + oci_rollback + Rolls back outstanding transaction + + + Description + + booloci_rollback + resourceconnection + + + oci_rollback rolls back all outstanding statements + for Oracle connection connection. + + + &return.success; + + + + Transactions are automatically rolled back when you close + the connection, or when the script ends, whichever is soonest. You + need to explicitly call oci_commit to commit + the transaction, or oci_rollback to abort it. + + + + + In PHP versions before 5.0.0 you must use ocirollback instead. + This name still can be used, it was left as alias of + oci_rollback for downwards compatability. + This, however, is deprecated and not recommended. + + + + See also oci_commit. + + + - - - oci_server_version - Returns server version - - - Description - - stringoci_server_version - resourceconnection - - - Returns a string with version information of the Oracle server, which uses - connection connection or returns &false; on error. - - - - <function>oci_server_version</function> example - + + + + oci_server_version + Returns server version + + + Description + + stringoci_server_version + resourceconnection + + + Returns a string with version information of the Oracle server, which uses + connection connection or returns &false; on error. + + + + <function>oci_server_version</function> example + ]]> - - - - - - In PHP versions before 5.0.0 you must use ociserverversion instead. - This name still can be used, it was left as alias of - oci_server_version for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + + In PHP versions before 5.0.0 you must use ociserverversion instead. + This name still can be used, it was left as alias of + oci_server_version for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - oci_set_prefetch - Sets number of rows to be prefetched - - - Description - - booloci_set_prefetch - resourcestatement - introws - - - Sets the number of rows to be prefetched after successful call to - oci_execute. The default value for - rows is 1. - - - - In PHP versions before 5.0.0 you must use ocisetprefetch instead. - This name still can be used, it was left as alias of - oci_set_prefetch for downwards compatability. - This, however, is deprecated and not recommended. - - - - &return.success; - - - See also oci8_.default_prefetch - ini option. - - - + + + + oci_set_prefetch + Sets number of rows to be prefetched + + + Description + + booloci_set_prefetch + resourcestatement + introws + + + Sets the number of rows to be prefetched after successful call to + oci_execute. The default value for + rows is 1. + + + + In PHP versions before 5.0.0 you must use ocisetprefetch instead. + This name still can be used, it was left as alias of + oci_set_prefetch for downwards compatability. + This, however, is deprecated and not recommended. + + + + &return.success; + + + See also oci8_.default_prefetch + ini option. + + + - - - oci_statement_type - Returns the type of an OCI statement - - - Description - - stringoci_statement_type - resourcestatement - - - oci_statement_type returns the query type of - statement statement as one of the following - values: - - SELECT - UPDATE - DELETE - INSERT - CREATE - DROP - ALTER - BEGIN - DECLARE - CALL (since PHP 5.2.1 and OCI8 - 1.2.3) - UNKNOWN - - - - Parameter statement is a valid OCI statement - identifier, returned from oci_parse. - - - - <function>oci_statement_type</function> example - + + + + oci_statement_type + Returns the type of an OCI statement + + + Description + + stringoci_statement_type + resourcestatement + + + oci_statement_type returns the query type of + statement statement as one of the following + values: + + SELECT + UPDATE + DELETE + INSERT + CREATE + DROP + ALTER + BEGIN + DECLARE + CALL (since PHP 5.2.1 and OCI8 + 1.2.3) + UNKNOWN + + + + Parameter statement is a valid OCI statement + identifier, returned from oci_parse. + + + + <function>oci_statement_type</function> example + "); } - + oci_close($conn); ?> ]]> - - - - - oci_statement_type returns &false; on error. - - - - In PHP versions before 5.0.0 you must use ocistatementtype instead. - This name still can be used, it was left as alias of - oci_statement_type for downwards compatability. - This, however, is deprecated and not recommended. - - - - + + + + + oci_statement_type returns &false; on error. + + + + In PHP versions before 5.0.0 you must use ocistatementtype instead. + This name still can be used, it was left as alias of + oci_statement_type for downwards compatability. + This, however, is deprecated and not recommended. + + + + - - - - ocifetchinto - Fetches the next row into an array - - - Description - - intocifetchinto - resourcestatement - arrayresult - intmode - - - - This function is deprecated. Recommended alternatives: - oci_fetch_array, oci_fetch_object, - oci_fetch_assoc and - oci_fetch_row. - - - - ocifetchinto fetches the next row of SELECT - statement into the result array. - ocifetchinto overwrites previous content of - result. By default - result will contain a zero-based array of all - columns that are not &null;. - - - The mode parameter allows you to change the - default behaviour. You can specify more the one flag by simply adding - them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). Valid values are: - - - OCI_ASSOC - return an associative array. - - - OCI_NUM - return a numeric array starting with - zero (default behaviour). - - - OCI_RETURN_NULLS - return the empty values for - column, which values is &null;. - - - OCI_RETURN_LOBS - return the value of a LOB - instead of the descriptor. - - - - - - <function>ocifetchinto</function> example - + + + + ocifetchinto + Fetches the next row into an array + + + Description + + intocifetchinto + resourcestatement + arrayresult + intmode + + + + This function is deprecated. Recommended alternatives: + oci_fetch_array, oci_fetch_object, + oci_fetch_assoc and + oci_fetch_row. + + + + ocifetchinto fetches the next row of SELECT + statement into the result array. + ocifetchinto overwrites previous content of + result. By default + result will contain a zero-based array of all + columns that are not &null;. + + + The mode parameter allows you to change the + default behaviour. You can specify more the one flag by simply adding + them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). Valid values are: + + + OCI_ASSOC - return an associative array. + + + OCI_NUM - return a numeric array starting with + zero (default behaviour). + + + OCI_RETURN_NULLS - return the empty values for + column, which values is &null;. + + + OCI_RETURN_LOBS - return the value of a LOB + instead of the descriptor. + + + + + + <function>ocifetchinto</function> example + ]]> - - - - - See also - oci_fetch_array, - oci_fetch_object, - oci_fetch_assoc, - oci_fetch_row, - oci_fetch and - oci_execute. - - - + + + + + See also + oci_fetch_array, + oci_fetch_object, + oci_fetch_assoc, + oci_fetch_row, + oci_fetch and + oci_execute. + + +