From 0cc80e227c2846cbfc6b878d92f602ea1969b089 Mon Sep 17 00:00:00 2001 From: Esen Sagynov Date: Thu, 5 Aug 2010 09:43:31 +0000 Subject: [PATCH] add cubrid documentation git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@301868 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/cubrid/book.developer.xml | 76 ++++ reference/cubrid/book.xml | 45 +++ reference/cubrid/configure.xml | 34 ++ reference/cubrid/constants.xml | 362 ++++++++++++++++++ reference/cubrid/entities.functions.xml | 40 ++ reference/cubrid/examples.xml | 153 ++++++++ .../cubrid/functions/cubrid-affected-rows.xml | 92 +++++ reference/cubrid/functions/cubrid-bind.xml | 115 ++++++ .../cubrid/functions/cubrid-close-prepare.xml | 100 +++++ .../cubrid/functions/cubrid-close-request.xml | 100 +++++ reference/cubrid/functions/cubrid-col-get.xml | 93 +++++ .../cubrid/functions/cubrid-col-size.xml | 90 +++++ .../cubrid/functions/cubrid-column-names.xml | 98 +++++ .../cubrid/functions/cubrid-column-types.xml | 98 +++++ reference/cubrid/functions/cubrid-commit.xml | 93 +++++ reference/cubrid/functions/cubrid-connect.xml | 123 ++++++ .../cubrid/functions/cubrid-current-oid.xml | 94 +++++ .../cubrid/functions/cubrid-disconnect.xml | 98 +++++ reference/cubrid/functions/cubrid-drop.xml | 98 +++++ .../functions/cubrid-error-code-facility.xml | 87 +++++ .../cubrid/functions/cubrid-error-code.xml | 87 +++++ .../cubrid/functions/cubrid-error-msg.xml | 87 +++++ reference/cubrid/functions/cubrid-execute.xml | 132 +++++++ reference/cubrid/functions/cubrid-fetch.xml | 110 ++++++ .../functions/cubrid-get-class-name.xml | 98 +++++ reference/cubrid/functions/cubrid-get.xml | 97 +++++ .../cubrid/functions/cubrid-is-instance.xml | 104 +++++ .../cubrid/functions/cubrid-load-from-glo.xml | 107 ++++++ .../cubrid/functions/cubrid-lock-read.xml | 93 +++++ .../cubrid/functions/cubrid-lock-write.xml | 93 +++++ .../cubrid/functions/cubrid-move-cursor.xml | 111 ++++++ reference/cubrid/functions/cubrid-new-glo.xml | 107 ++++++ .../cubrid/functions/cubrid-num-cols.xml | 95 +++++ .../cubrid/functions/cubrid-num-rows.xml | 99 +++++ reference/cubrid/functions/cubrid-prepare.xml | 108 ++++++ reference/cubrid/functions/cubrid-put.xml | 111 ++++++ .../cubrid/functions/cubrid-rollback.xml | 99 +++++ .../cubrid/functions/cubrid-save-to-glo.xml | 107 ++++++ reference/cubrid/functions/cubrid-schema.xml | 97 +++++ .../cubrid/functions/cubrid-send-glo.xml | 100 +++++ .../cubrid/functions/cubrid-seq-drop.xml | 111 ++++++ .../cubrid/functions/cubrid-seq-insert.xml | 109 ++++++ reference/cubrid/functions/cubrid-seq-put.xml | 109 ++++++ reference/cubrid/functions/cubrid-set-add.xml | 103 +++++ .../cubrid/functions/cubrid-set-drop.xml | 103 +++++ reference/cubrid/functions/cubrid-version.xml | 79 ++++ reference/cubrid/reference.xml | 30 ++ reference/cubrid/setup.xml | 98 +++++ reference/cubrid/versions.xml | 73 ++++ 49 files changed, 4946 insertions(+) create mode 100644 reference/cubrid/book.developer.xml create mode 100644 reference/cubrid/book.xml create mode 100644 reference/cubrid/configure.xml create mode 100644 reference/cubrid/constants.xml create mode 100644 reference/cubrid/entities.functions.xml create mode 100644 reference/cubrid/examples.xml create mode 100644 reference/cubrid/functions/cubrid-affected-rows.xml create mode 100644 reference/cubrid/functions/cubrid-bind.xml create mode 100644 reference/cubrid/functions/cubrid-close-prepare.xml create mode 100644 reference/cubrid/functions/cubrid-close-request.xml create mode 100644 reference/cubrid/functions/cubrid-col-get.xml create mode 100644 reference/cubrid/functions/cubrid-col-size.xml create mode 100644 reference/cubrid/functions/cubrid-column-names.xml create mode 100644 reference/cubrid/functions/cubrid-column-types.xml create mode 100644 reference/cubrid/functions/cubrid-commit.xml create mode 100644 reference/cubrid/functions/cubrid-connect.xml create mode 100644 reference/cubrid/functions/cubrid-current-oid.xml create mode 100644 reference/cubrid/functions/cubrid-disconnect.xml create mode 100644 reference/cubrid/functions/cubrid-drop.xml create mode 100644 reference/cubrid/functions/cubrid-error-code-facility.xml create mode 100644 reference/cubrid/functions/cubrid-error-code.xml create mode 100644 reference/cubrid/functions/cubrid-error-msg.xml create mode 100644 reference/cubrid/functions/cubrid-execute.xml create mode 100644 reference/cubrid/functions/cubrid-fetch.xml create mode 100644 reference/cubrid/functions/cubrid-get-class-name.xml create mode 100644 reference/cubrid/functions/cubrid-get.xml create mode 100644 reference/cubrid/functions/cubrid-is-instance.xml create mode 100644 reference/cubrid/functions/cubrid-load-from-glo.xml create mode 100644 reference/cubrid/functions/cubrid-lock-read.xml create mode 100644 reference/cubrid/functions/cubrid-lock-write.xml create mode 100644 reference/cubrid/functions/cubrid-move-cursor.xml create mode 100644 reference/cubrid/functions/cubrid-new-glo.xml create mode 100644 reference/cubrid/functions/cubrid-num-cols.xml create mode 100644 reference/cubrid/functions/cubrid-num-rows.xml create mode 100644 reference/cubrid/functions/cubrid-prepare.xml create mode 100644 reference/cubrid/functions/cubrid-put.xml create mode 100644 reference/cubrid/functions/cubrid-rollback.xml create mode 100644 reference/cubrid/functions/cubrid-save-to-glo.xml create mode 100644 reference/cubrid/functions/cubrid-schema.xml create mode 100644 reference/cubrid/functions/cubrid-send-glo.xml create mode 100644 reference/cubrid/functions/cubrid-seq-drop.xml create mode 100644 reference/cubrid/functions/cubrid-seq-insert.xml create mode 100644 reference/cubrid/functions/cubrid-seq-put.xml create mode 100644 reference/cubrid/functions/cubrid-set-add.xml create mode 100644 reference/cubrid/functions/cubrid-set-drop.xml create mode 100644 reference/cubrid/functions/cubrid-version.xml create mode 100644 reference/cubrid/reference.xml create mode 100644 reference/cubrid/setup.xml create mode 100644 reference/cubrid/versions.xml diff --git a/reference/cubrid/book.developer.xml b/reference/cubrid/book.developer.xml new file mode 100644 index 0000000000..ed1dfad831 --- /dev/null +++ b/reference/cubrid/book.developer.xml @@ -0,0 +1,76 @@ + + + + + + + +%xhtml-lat1; +%xhtml-symbol; +%xhtml-special; +%isopub; + + + + + + +%language-defs.default; +%extensions.default; +%language-snippets.default; + + + + + + + + + +%global.entities; +%file.entities; +%frontpage.entities; +]> + + + Cubrid + Cubrid + + + &reftitle.intro; + + + + + + &reference.cubrid.setup; + &reference.cubrid.constants; + &reference.cubrid.examples; + &reference.cubrid.reference; + + + + + diff --git a/reference/cubrid/book.xml b/reference/cubrid/book.xml new file mode 100644 index 0000000000..2b5b826ae0 --- /dev/null +++ b/reference/cubrid/book.xml @@ -0,0 +1,45 @@ + + + + + Cubrid + Cubrid + + + &reftitle.intro; + + These functions allow you to access CUBRID database servers. More information about CUBRID can be found at CUBRID. + + + Documentation for CUBRID can be found at CUBRID Documentation. + + + + + &reference.cubrid.setup; + &reference.cubrid.constants; + &reference.cubrid.examples; + &reference.cubrid.reference; + + + + diff --git a/reference/cubrid/configure.xml b/reference/cubrid/configure.xml new file mode 100644 index 0000000000..ea87f3d6ec --- /dev/null +++ b/reference/cubrid/configure.xml @@ -0,0 +1,34 @@ + + + +
+ &reftitle.install; + + + + + + +
+ + + diff --git a/reference/cubrid/constants.xml b/reference/cubrid/constants.xml new file mode 100644 index 0000000000..3598da3f15 --- /dev/null +++ b/reference/cubrid/constants.xml @@ -0,0 +1,362 @@ + + + + + &reftitle.constants; + &extension.constants; + + + + + CUBRID_INCLUDE_OID + (integer) + + + + Is used to determine whether to get OID after query execution. + + + + + + CUBRID_ASYNC + (integer) + + + + Is used to execute the query in asynchronous mode. + + + + + + CUBRID_NUM + (integer) + + + + Is used to get the query result as a numeric array (0-default). + + + + + + CUBRID_ASSOC + (integer) + + + + Is used to get the query result as an associative array. + + + + + + CUBRID_BOTH + (integer) + + + + Is used to get the query result as both numeric and associative arrays (default value). + + + + + + CUBRID_OBJECT + (integer) + + + + Is used to get the query result an object that has the attribute whose name is the same as the column name. + + + + + + CUBRID_CURSOR_FIRST + (integer) + + + + Is used to move the current cursor to the first position in the result. + + + + + + CUBRID_CURSOR_CURRENT + (integer) + + + + Is used to move the current cursor as a default value if the origin is not specified. + + + + + + CUBRID_CURSOR_LAST + (integer) + + + + Is used to move the current cursor to the last position in the result. + + + + + + CUBRID_CURSOR_SUCCESS + (integer) + + + + Is the returned value of cubrid_move_cursor function in case of success. + + + + + + CUBRID_NO_MORE_DATA + (integer) + + + + Is the returned value of cubrid_move_cursor function in case of failure. + + + + + + CUBRID_CURSOR_ERROR + (integer) + + + + Is the returned value of cubrid_move_cursor function in case of failure. + + + + + + CUBRID_SCH_CLASS + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_VCLASS + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_QUERY_SPEC + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_ATTRIBUTE + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_CLASS_ATTRIBUTE + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_METHOD + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_CLASS_METHOD + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_METHOD_FILE + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_SUPERCLASS + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_SUBCLASS + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_CONSTRAINT + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_TRIGGER + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_CLASS_PRIVILEGE + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_SCH_ATTR_PRIVILEGE + (integer) + + + + Is a schema type used for cubrid_schema function. + + + + + + CUBRID_FACILITY_DBMS + (integer) + + + + Is the facility code of the occurred error code when using cubrid_error_code_facility function. + + + + + + CUBRID_FACILITY_CAS + (integer) + + + + Is the facility code of the occurred error code when using cubrid_error_code_facility function. + + + + + + CUBRID_FACILITY_CCI + (integer) + + + + Is the facility code of the occurred error code when using cubrid_error_code_facility function. + + + + + + CUBRID_FACILITY_CLIENT + (integer) + + + + Is the facility code of the occurred error code when using cubrid_error_code_facility function. + + + + + + + + diff --git a/reference/cubrid/entities.functions.xml b/reference/cubrid/entities.functions.xml new file mode 100644 index 0000000000..88272e1652 --- /dev/null +++ b/reference/cubrid/entities.functions.xml @@ -0,0 +1,40 @@ +&reference.cubrid.functions.cubrid-affected-rows; +&reference.cubrid.functions.cubrid-bind; +&reference.cubrid.functions.cubrid-close-prepare; +&reference.cubrid.functions.cubrid-close-request; +&reference.cubrid.functions.cubrid-col-get; +&reference.cubrid.functions.cubrid-col-size; +&reference.cubrid.functions.cubrid-column-names; +&reference.cubrid.functions.cubrid-column-types; +&reference.cubrid.functions.cubrid-commit; +&reference.cubrid.functions.cubrid-connect; +&reference.cubrid.functions.cubrid-current-oid; +&reference.cubrid.functions.cubrid-disconnect; +&reference.cubrid.functions.cubrid-drop; +&reference.cubrid.functions.cubrid-error-code-facility; +&reference.cubrid.functions.cubrid-error-code; +&reference.cubrid.functions.cubrid-error-msg; +&reference.cubrid.functions.cubrid-execute; +&reference.cubrid.functions.cubrid-fetch; +&reference.cubrid.functions.cubrid-get-class-name; +&reference.cubrid.functions.cubrid-get; +&reference.cubrid.functions.cubrid-is-instance; +&reference.cubrid.functions.cubrid-load-from-glo; +&reference.cubrid.functions.cubrid-lock-read; +&reference.cubrid.functions.cubrid-lock-write; +&reference.cubrid.functions.cubrid-move-cursor; +&reference.cubrid.functions.cubrid-new-glo; +&reference.cubrid.functions.cubrid-num-cols; +&reference.cubrid.functions.cubrid-num-rows; +&reference.cubrid.functions.cubrid-prepare; +&reference.cubrid.functions.cubrid-put; +&reference.cubrid.functions.cubrid-rollback; +&reference.cubrid.functions.cubrid-save-to-glo; +&reference.cubrid.functions.cubrid-schema; +&reference.cubrid.functions.cubrid-send-glo; +&reference.cubrid.functions.cubrid-seq-drop; +&reference.cubrid.functions.cubrid-seq-insert; +&reference.cubrid.functions.cubrid-seq-put; +&reference.cubrid.functions.cubrid-set-add; +&reference.cubrid.functions.cubrid-set-drop; +&reference.cubrid.functions.cubrid-version; diff --git a/reference/cubrid/examples.xml b/reference/cubrid/examples.xml new file mode 100644 index 0000000000..a0ebe87559 --- /dev/null +++ b/reference/cubrid/examples.xml @@ -0,0 +1,153 @@ + + + + + &reftitle.examples; + The following is a simple example that establishes a connection between PHP and CUBRID. This section will cover the most basic and notable features. The following code required to connect to CUBRID database, which means CUBRID Server and CUBRID Broker have to be running. + The example below uses the demodb database as an examples. By default it is created during the installation. Make sure it has been created. + + + + Example of Data Retrieval + + + + + + +
+ + + "); + + while (list($key, $colname) = each($columns)) { + echo(""); + } + + echo(""); + + // Get the results from the result set. + while ($row = cubrid_fetch($result)) { + echo(""); + + for ($i = 0; $i < $num_fields; $i++) { + echo(""); + } + + echo(""); + } + } + // The PHP module in the CUBRID runs in a 3-tier architecture. Even when + // calling SELECT for transaction processing, it is processed as a part + // of the transaction. Therefore, the transaction needs to be rolled back + // by calling commit or rollback even though SELECT was called for smooth + // performance. + cubrid_commit($cubrid_con); + cubrid_disconnect($cubrid_con); + ?> + + + ]]> + + + + Example of Data Insertion + + + + + + +
+
$colname
"); + echo($row[$i]); + echo("
+ + + + + ]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid-affected-rows.xml b/reference/cubrid/functions/cubrid-affected-rows.xml new file mode 100644 index 0000000000..af21daec51 --- /dev/null +++ b/reference/cubrid/functions/cubrid-affected-rows.xml @@ -0,0 +1,92 @@ + + + + + + cubrid_affected_rows + Get number of affected rows in previous Cubrid operation + + + + &reftitle.description; + + intcubrid_affected_rows + intreq_handle + + + The cubrid_affected_rows function is used to get the number of rows affected by the SQL sentence (INSERT, DELETE, UPDATE). + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + Number of rows affected by the SQL sentence, when process is successful. + + + -1, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_affected_rows</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + diff --git a/reference/cubrid/functions/cubrid-bind.xml b/reference/cubrid/functions/cubrid-bind.xml new file mode 100644 index 0000000000..4a69301bd2 --- /dev/null +++ b/reference/cubrid/functions/cubrid-bind.xml @@ -0,0 +1,115 @@ + + + + + + cubrid_bind + Is used to bind values + + + + &reftitle.description; + + intcubrid_bind + intreq_handle + intbind_index + stringbind_value + stringbind_value_type + + + The cubrid_bind function is used to bind values in a cubrid_prepare variable, a various types in PHP and corresponding types in SQL. + + + + + &reftitle.parameters; + + + + req_handle + Request handle as a result of cubrid_prepare. + + + bind_index + Index for binding. + + + bind_value + Actual value for binding. + + + bind_index + A type of the value to bind. (It is omitted by default. Thus, system internally converts and matches the corresponding types if it is omitted. However, you need to specify the exact type of the value as an argument when they are either NCHAR or BIT). + + + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_bind</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + cubrid_prepare + + + + + + diff --git a/reference/cubrid/functions/cubrid-close-prepare.xml b/reference/cubrid/functions/cubrid-close-prepare.xml new file mode 100644 index 0000000000..41d30e3254 --- /dev/null +++ b/reference/cubrid/functions/cubrid-close-prepare.xml @@ -0,0 +1,100 @@ + + + + + + cubrid_close_prepare + Closes the request handle + + + + &reftitle.description; + + intcubrid_close_prepare + intreq_handle + + + The cubrid_close_prepare function closes the request handle given by the req_handle argument, and releases the memory region related to the handle. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_close_prepare</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + \ No newline at end of file diff --git a/reference/cubrid/functions/cubrid-close-request.xml b/reference/cubrid/functions/cubrid-close-request.xml new file mode 100644 index 0000000000..c4b32dace9 --- /dev/null +++ b/reference/cubrid/functions/cubrid-close-request.xml @@ -0,0 +1,100 @@ + + + + + + cubrid_close_request + Closes the request handle + + + + &reftitle.description; + + intcubrid_close_request + intreq_handle + + + The cubrid_close_request function closes the request handle given by the req_handle argument, and releases the memory region related to the handle. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_close_request</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + \ No newline at end of file diff --git a/reference/cubrid/functions/cubrid-col-get.xml b/reference/cubrid/functions/cubrid-col-get.xml new file mode 100644 index 0000000000..f1cfeb5e6e --- /dev/null +++ b/reference/cubrid/functions/cubrid-col-get.xml @@ -0,0 +1,93 @@ + + + + + + cubrid_col_get + Is used to get contents of the elements + + + + &reftitle.description; + + intcubrid_col_get + intconn_handle + stringoid + stringattr_name + + + The cubrid_col_get function is used to get contents of the elements of the collection type (set, multiset, sequence) attribute you requested as an array. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to read. + + + attr_name + Attribute name that you want to read from the instance. + + + + + + + + &reftitle.returnvalues; + + Array (0-based numerical array) containing the elements you requested, when process is successful; + + + &false; (to distinguish the error from the situation of attribute having empty collection or NULL, in case of error, a warning message is shown; in such case you can check the error by using cubrid_error_code), when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_col_get</function> example + + +]]> + + + + + + + + diff --git a/reference/cubrid/functions/cubrid-col-size.xml b/reference/cubrid/functions/cubrid-col-size.xml new file mode 100644 index 0000000000..a6a6b16a31 --- /dev/null +++ b/reference/cubrid/functions/cubrid-col-size.xml @@ -0,0 +1,90 @@ + + + + + + cubrid_col_size + Is used to get the number of elements + + + + &reftitle.description; + + intcubrid_col_size + intconn_handle + stringoid + stringattr_name + + + The cubrid_col_size function is used to get the number of elements in a collection type (set, multiset, sequence) attribute. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid the instance that you want to work with. + + + attr_name + Name of the attribute that you want to work with. + + + + + + + &reftitle.returnvalues; + + Number of elements, when process is successful. + + + -1, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_col_size</function> example + + +]]> + + + + + + + + diff --git a/reference/cubrid/functions/cubrid-column-names.xml b/reference/cubrid/functions/cubrid-column-names.xml new file mode 100644 index 0000000000..130c1b4d8c --- /dev/null +++ b/reference/cubrid/functions/cubrid-column-names.xml @@ -0,0 +1,98 @@ + + + + + + cubrid_column_names + Is used to get the column names + + + + &reftitle.description; + + mixedcubrid_column_names + intreq_handle + + + The cubrid_column_names function is used to get the column names of the query result by using req_handle. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + array containing column names, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_column_names</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_prepare + cubrid_execute + cubrid_column_types + + + + + + + diff --git a/reference/cubrid/functions/cubrid-column-types.xml b/reference/cubrid/functions/cubrid-column-types.xml new file mode 100644 index 0000000000..8be11a1085 --- /dev/null +++ b/reference/cubrid/functions/cubrid-column-types.xml @@ -0,0 +1,98 @@ + + + + + + cubrid_column_types + Gets column types + + + + &reftitle.description; + + mixedcubrid_column_types + intreq_handle + + + The cubrid_column_types function gets column types of query results by using req_handle. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + Array containing column types, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_column_types</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_column_names + cubrid_prepare + cubrid_execute + + + + + + + diff --git a/reference/cubrid/functions/cubrid-commit.xml b/reference/cubrid/functions/cubrid-commit.xml new file mode 100644 index 0000000000..fd18e16466 --- /dev/null +++ b/reference/cubrid/functions/cubrid-commit.xml @@ -0,0 +1,93 @@ + + + + + + cubrid_commit + Is used to execute commit on the transaction + + + + &reftitle.description; + + intcubrid_commit + intconn_handle + + The cubrid_commit function is used to execute commit on the transaction pointed by conn_handle, currently on progress. Connection to the server is closed after the cubrid_commit function is called; the connection handle is still valid, however. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_commit</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_rollback + + + + + + diff --git a/reference/cubrid/functions/cubrid-connect.xml b/reference/cubrid/functions/cubrid-connect.xml new file mode 100644 index 0000000000..e61c5f47e4 --- /dev/null +++ b/reference/cubrid/functions/cubrid-connect.xml @@ -0,0 +1,123 @@ + + + + + + cubrid_connect + Is used to establish the environment for connecting to your server + + + + &reftitle.description; + + intcubrid_connect + stringhost + intport + stringdbname + stringuserid + stringpasswd + + + The cubrid_connect function is used to establish the environment for connecting to your server by using your server address, port number, database name, user name, and password. If the user name and password is not given, then the "PUBLIC" connection will be made by default. + + + Calling the cubrid_connect function does not necessarily make the connection to your server. The actual connection will be made when an operation is requested by using the connection handle. + + + + + &reftitle.parameters; + + + + host + Host name of CAS server. + + + port + Port number of CAS server. + + + dbname + Name of database. + + + userid + User name for the database. + + + passwd + User password. + + + + + + + &reftitle.returnvalues; + + Connection handle, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_connect</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_disconnect + + + + + + + diff --git a/reference/cubrid/functions/cubrid-current-oid.xml b/reference/cubrid/functions/cubrid-current-oid.xml new file mode 100644 index 0000000000..f0871245c7 --- /dev/null +++ b/reference/cubrid/functions/cubrid-current-oid.xml @@ -0,0 +1,94 @@ + + + + + + cubrid_current_oid + Is used to get the oid of the current cursor location + + + + &reftitle.description; + + mixedcubrid_current_oid + intreq_handle + + + The cubrid_current_oid function is used to get the oid of the current cursor location from the query result. To use cubrid_current_oid, the query executed must be a updatable query, and the CUBRID_ INCLUDE_OID option must be included during the query execution. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + Oid of current cursor location, when process is successful + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_current_oid</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + diff --git a/reference/cubrid/functions/cubrid-disconnect.xml b/reference/cubrid/functions/cubrid-disconnect.xml new file mode 100644 index 0000000000..350f7e934e --- /dev/null +++ b/reference/cubrid/functions/cubrid-disconnect.xml @@ -0,0 +1,98 @@ + + + + + + cubrid_disconnect + Ends the transaction currently on process + + + + &reftitle.description; + + intcubrid_disconnect + intconn_handle + + + The cubrid_disconnect function ends the transaction currently on process, closes the connection handle and disconnects from server. If there exists any request handle not closed yet at this point, it will be closed. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_disconnect</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_connect + + + + + + + diff --git a/reference/cubrid/functions/cubrid-drop.xml b/reference/cubrid/functions/cubrid-drop.xml new file mode 100644 index 0000000000..6b9eaca129 --- /dev/null +++ b/reference/cubrid/functions/cubrid-drop.xml @@ -0,0 +1,98 @@ + + + + + + cubrid_drop + Is used to delete an instance + + + + &reftitle.description; + + intcubrid_drop + intconn_handle + stringoid + + + The cubrid_drop function is used to delete an instance from database by using oid. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to delete. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_drop</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_is_instance + + + + + + + diff --git a/reference/cubrid/functions/cubrid-error-code-facility.xml b/reference/cubrid/functions/cubrid-error-code-facility.xml new file mode 100644 index 0000000000..47c19506a9 --- /dev/null +++ b/reference/cubrid/functions/cubrid-error-code-facility.xml @@ -0,0 +1,87 @@ + + + + + + cubrid_error_code_facility + Is used to get the facility code + + + + &reftitle.description; + + intcubrid_error_code_facility + + + + The cubrid_error_code_facility function is used to get the facility code (level in which the error occurred) from the error code of the error that occurred during the API execution. Usually, you can get the error code when API returns false as its return value. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Facility code of the error code that occurred: CUBRID_FACILITY_DBMS, CUBRID_FACILITY_CAS, CUBRID_FACILITY_CCI, CUBRID_FACILITY_CLIENT + + + + + + &reftitle.examples; + + <function>cubrid_error_code_facility</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_error_code + cubrid_error_msg + + + + + + + diff --git a/reference/cubrid/functions/cubrid-error-code.xml b/reference/cubrid/functions/cubrid-error-code.xml new file mode 100644 index 0000000000..a7fbe92908 --- /dev/null +++ b/reference/cubrid/functions/cubrid-error-code.xml @@ -0,0 +1,87 @@ + + + + + + cubrid_error_code + Is used to get the error code + + + + &reftitle.description; + + intcubrid_error_code + + + + The cubrid_error_code function is used to get the error code of the error that occurred during the API execution. Usually, it gets the error code when API returns false as its return value. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Error code of the error that occurred. + + + + + + &reftitle.examples; + + <function>cubrid_error_code</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_error_code_facility + cubrid_error_msg + + + + + + + diff --git a/reference/cubrid/functions/cubrid-error-msg.xml b/reference/cubrid/functions/cubrid-error-msg.xml new file mode 100644 index 0000000000..f22429bf53 --- /dev/null +++ b/reference/cubrid/functions/cubrid-error-msg.xml @@ -0,0 +1,87 @@ + + + + + + cubrid_error_msg + Is used to get the error message + + + + &reftitle.description; + + stringcubrid_error_msg + + + + The cubrid_error_msg function is used to get the error message that occurred during the use of CUBRID API. Usually, it gets error message when API returns false as its return value. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Error message that occurred. + + + + + + &reftitle.examples; + + <function>cubrid_error_msg</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_error_code + cubrid_error_code_facility + + + + + + + diff --git a/reference/cubrid/functions/cubrid-execute.xml b/reference/cubrid/functions/cubrid-execute.xml new file mode 100644 index 0000000000..92109ec3c0 --- /dev/null +++ b/reference/cubrid/functions/cubrid-execute.xml @@ -0,0 +1,132 @@ + + + + + + cubrid_execute + Is used to execute the given SQL sentence. + + + + &reftitle.description; + + intcubrid_execute + intconn_handle + stringSQL + intoption + + + intcubrid_execute + intrequest_handle + intoption + + + The cubrid_execute function is used to execute the given SQL sentence. It executes the query by using conn_handle and SQL, and then returns the request handle created. It is used for simple execution of query, where the parameter binding is not needed. In addition, the cubrid_execute function is used to execute the prepared statement by means of cubrid_prepare and cubrid_bind. At this time, you need to specify arguments of request_handle and option. + + + You can use the option argument to tell whether to receive oid of the row after the execution, and, whether to execute the query in asynchronous mode. You can use it by setting the CUBRID_INCLUDE_OID and CUBRID_ASYNC using bitwise or operator. If the both variables are not explicitly given, they are not selected by default. + + + If the first argument is request_handle to execute the cubrid_prepare function, you can specify an option, CUBRID_ASYNC only. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + SQL + SQL to be executed. + + + option + Query execution option CUBRID_INCLUDE_OID, CUBRID_ASYNC. + + + request_handle + cubrid_prepare handle. + + + + + + + &reftitle.returnvalues; + + Request handle, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_execute</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_close_request + cubrid_commit + cubrid_rollback + cubrid_prepare + cubrid_bind + + + + + + + diff --git a/reference/cubrid/functions/cubrid-fetch.xml b/reference/cubrid/functions/cubrid-fetch.xml new file mode 100644 index 0000000000..9998a67b3b --- /dev/null +++ b/reference/cubrid/functions/cubrid-fetch.xml @@ -0,0 +1,110 @@ + + + + + + cubrid_fetch + Is used to get a single row + + + + &reftitle.description; + + mixedcubrid_fetch + intreq_handle + inttype + + + The cubrid_fetch function is used to get a single row from the query result. The cursor automatically moves to the next row after getting the result. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + type + Array type of the fetched result CUBRID_NUM, CUBRID_ASSOC, CUBRID_BOTH, CUBRID_OBJECT. + + + + + + + &reftitle.returnvalues; + Result array or object, when process is successful. + &false;, when process is unsuccessful. + The result can be received either as an array or as an object, and you can decide which data type to use by setting the type argument. The type variable can be set to one of the following values: + + CUBRID_NUM : Numerical array (0-based) + CUBRID_ASSOC : Associative array + CUBRID_BOTH : Numerical & Associative array (default) + CUBRID_OBJECT : object that has the attribute name as the column name of query result + + When type argument is omitted, the result will be received using CUBRID_BOTH option as default. When you want to receive query result in object data type, the column name of the result must obey the naming rules for identifiers in PHP. For example, column name such as "count(*)" cannot be received in object type. + + + + &reftitle.examples; + + <function>cubrid_fetch</function> example + +id; + echo $row->name; + } +} +?> +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + diff --git a/reference/cubrid/functions/cubrid-get-class-name.xml b/reference/cubrid/functions/cubrid-get-class-name.xml new file mode 100644 index 0000000000..b1ef46ef03 --- /dev/null +++ b/reference/cubrid/functions/cubrid-get-class-name.xml @@ -0,0 +1,98 @@ + + + + + + cubrid_get_class_name + Is used to get the class name + + + + &reftitle.description; + + mixedcubrid_get_class_name + intconn_handle + stringoid + + + The cubrid_get_class_name function is used to get the class name from oid. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to check the existence. + + + + + + + &reftitle.returnvalues; + + Class name when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_get_class_name</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_is_instance + cubrid_drop + + + + + + diff --git a/reference/cubrid/functions/cubrid-get.xml b/reference/cubrid/functions/cubrid-get.xml new file mode 100644 index 0000000000..786983996d --- /dev/null +++ b/reference/cubrid/functions/cubrid-get.xml @@ -0,0 +1,97 @@ + + + + + + cubrid_get + Is used to get the attribute + + + + &reftitle.description; + + mixedcubrid_get + intconn_handle + stringoid + mixedattr + + + The cubrid_get function is used to get the attribute of the instance of the given oid. You can get single attribute by using string data type for the attr argument, or many attributes by using array data type for the attr argument. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to read. + + + attr + Name of the attribute that you want to read. + + + + + + + + &reftitle.returnvalues; + Content of the requested attribute, when process is successful; + &false; when process is unsuccessful (If error occurs to distinguish empty string from NULL, then it prints the warning message. You can check the error by using cubrid_error_code) + When attr is set with string data type, the result is returned as a string; when attr is set with array data type (0-based numerical array), then the result is returned in associative array. When attr is omitted, then all attributes are received in array form. + + + + &reftitle.examples; + + <function>cubrid_get</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_put + + + + + + + diff --git a/reference/cubrid/functions/cubrid-is-instance.xml b/reference/cubrid/functions/cubrid-is-instance.xml new file mode 100644 index 0000000000..d642b49236 --- /dev/null +++ b/reference/cubrid/functions/cubrid-is-instance.xml @@ -0,0 +1,104 @@ + + + + + + cubrid_is_instance + Is used to check whether the instance + + + + &reftitle.description; + + intcubrid_is_instance + intconn_handle + stringoid + + + The cubrid_is_instance function is used to check whether the instance pointed by the given oid exists or not. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to check the existence. + + + + + + + &reftitle.returnvalues; + + 1, if such instance exists; + + + 0, if such instance does not exist; + + + -1, in case of error + + + + + &reftitle.examples; + + <function>cubrid_is_instance</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_drop + cubrid_get_class_name + + + + + + + diff --git a/reference/cubrid/functions/cubrid-load-from-glo.xml b/reference/cubrid/functions/cubrid-load-from-glo.xml new file mode 100644 index 0000000000..2981f2ca0f --- /dev/null +++ b/reference/cubrid/functions/cubrid-load-from-glo.xml @@ -0,0 +1,107 @@ + + + + + + cubrid_load_from_glo + Is used to read a data + + + + &reftitle.description; + + intcubrid_load_from_glo + intconn_handle + stringoid + stringfile_name + + + The cubrid_load_from_glo function is used to read a data from a glo instance, and saves it in a designated file. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the glo instance that you want to read the data from. + + + file_name + Name of the file where you want to save the data in. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_load_from_glo</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_new_glo + cubrid_save_to_glo + cubrid_send_glo + + + + + + + diff --git a/reference/cubrid/functions/cubrid-lock-read.xml b/reference/cubrid/functions/cubrid-lock-read.xml new file mode 100644 index 0000000000..88040ac655 --- /dev/null +++ b/reference/cubrid/functions/cubrid-lock-read.xml @@ -0,0 +1,93 @@ + + + + + + cubrid_lock_read + Is used to put read lock + + + + &reftitle.description; + + intcubrid_lock_read + intconn_handle + stringoid + + + The cubrid_lock_read function is used to put read lock on the instance pointed by given oid. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to put read lock on. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_lock_read</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_lock_write + + + + + + + diff --git a/reference/cubrid/functions/cubrid-lock-write.xml b/reference/cubrid/functions/cubrid-lock-write.xml new file mode 100644 index 0000000000..2e0dd0e1e9 --- /dev/null +++ b/reference/cubrid/functions/cubrid-lock-write.xml @@ -0,0 +1,93 @@ + + + + + + cubrid_lock_write + Is used to put write lock + + + + &reftitle.description; + + intcubrid_lock_write + intconn_handle + stringoid + + + The cubrid_lock_write function is used to put write lock on the instance pointed by the given oid. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to put write lock on. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_lock_write</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_lock_read + + + + + + + diff --git a/reference/cubrid/functions/cubrid-move-cursor.xml b/reference/cubrid/functions/cubrid-move-cursor.xml new file mode 100644 index 0000000000..055086627d --- /dev/null +++ b/reference/cubrid/functions/cubrid-move-cursor.xml @@ -0,0 +1,111 @@ + + + + + + cubrid_move_cursor + Is used to move the current cursor location + + + + &reftitle.description; + + intcubrid_move_cursor + intreq_handle + intoffset + intorigin + + + The cubrid_move_cursor function is used to move the current cursor location of req_handle by the value set in the offset argument, to the direction set in the origin argument. To set the origin argument, you can use CUBRID_CURSOR_FIRST for the first part of the result, CUBRID_CURSOR_CURRENT for the current location of the result, or CUBRID_CURSOR_LAST for the last part of the result. If origin argument is not explicitly designated, then the function uses CUBRID_CURSOR_CURRENT as its default value. + + + If the value of cursor movement range goes over the valid limit, then the cursor moves to the next location after the valid range for the cursor. For example, if you move 20 units in the result with the size of 10, then the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + offset + Number of units you want to move the cursor. + + + origin + Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. + + + + + + + &reftitle.returnvalues; + + CUBRID_CURSOR_SUCCESS, when process is successful. + + + CUBRID_NO_MORE_DATA, when it is not a valid cursor location. + + + CUBRID_CURSOR_ERROR, in case of error. + + + + + &reftitle.examples; + + <function>cubrid_move_cursor</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + + + + + + + diff --git a/reference/cubrid/functions/cubrid-new-glo.xml b/reference/cubrid/functions/cubrid-new-glo.xml new file mode 100644 index 0000000000..2c25c4a4e7 --- /dev/null +++ b/reference/cubrid/functions/cubrid-new-glo.xml @@ -0,0 +1,107 @@ + + + + + + cubrid_new_glo + Is used to create a glo instance + + + + &reftitle.description; + + mixedcubrid_new_glo + intconn_handle + stringclass_name + stringfile_name + + + The cubrid_new_glo function is used to create a glo instance in the requested class (glo class). The glo created is a LO type, and is stored in the file_name file. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + class_name + Name of the class that you want to create a glo in. + + + file_name + The file name that you want to save in the newly created glo. + + + + + + + &reftitle.returnvalues; + + Oid of the instance created, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_new_glo</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_save_to_glo + cubrid_load_from_glo + cubrid_send_glo + + + + + + + diff --git a/reference/cubrid/functions/cubrid-num-cols.xml b/reference/cubrid/functions/cubrid-num-cols.xml new file mode 100644 index 0000000000..adb63fc32b --- /dev/null +++ b/reference/cubrid/functions/cubrid-num-cols.xml @@ -0,0 +1,95 @@ + + + + + + cubrid_num_cols + Is used to get the number of columns + + + + &reftitle.description; + + intcubrid_num_cols + intreq_handle + + + The cubrid_num_cols function is used to get the number of columns from the query result. It can only be used when the query executed is a select sentence. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + Number of columns, when process is successful. + + + -1, in case of error. + + + + + &reftitle.examples; + + <function>cubrid_num_cols</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + cubrid_num_rows + + + + + + + diff --git a/reference/cubrid/functions/cubrid-num-rows.xml b/reference/cubrid/functions/cubrid-num-rows.xml new file mode 100644 index 0000000000..9b308f8b99 --- /dev/null +++ b/reference/cubrid/functions/cubrid-num-rows.xml @@ -0,0 +1,99 @@ + + + + + + cubrid_num_rows + Is used to get the number of rows + + + + &reftitle.description; + + intcubrid_num_rows + intreq_handle + + + The cubrid_num_rows function is used to get the number of rows from the query result. You can use it only when the query executed is a select sentence. When you want to know such value for INSERT, UPDATE, or DELETE query, you have to use the cubrid_affected_rows function. The cubrid_num_rows function can only be used for synchronous query; it returns 0 when it is used for asynchronous query. + + + + + &reftitle.parameters; + + + + req_handle + Request handle. + + + + + + + &reftitle.returnvalues; + + Number of rows, when process is successful. + + + 0 when the query was done in async mode. + + + -1, in case of error. + + + + + &reftitle.examples; + + <function>cubrid_num_rows</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + cubrid_num_cols + cubrid_affected_rows + + + + + + + diff --git a/reference/cubrid/functions/cubrid-prepare.xml b/reference/cubrid/functions/cubrid-prepare.xml new file mode 100644 index 0000000000..c7cb0ecab7 --- /dev/null +++ b/reference/cubrid/functions/cubrid-prepare.xml @@ -0,0 +1,108 @@ + + + + + + cubrid_prepare + Is a sort of API which represents SQL statements + + + + &reftitle.description; + + intcubrid_prepare + intconn_handle + stringprepare_stmt + intoption + + + The cubrid_prepare function is a sort of API which represents SQL statements compiled previously to a given connection handle. This pre-compiled SQL statement will be included in the cubrid_prepare. Accccordingly, you can use this statement effectively to execute several times repeatedly or to process long data. Only a single statement can be used and a parameter may put a question mark (?) to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES cluse of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a MARK(?) by the cubrid_bind only. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + prepare_stmt + Prepare query. + + + option + OID return option CUBRID_INCLUDE_OID. + + + + + + + &reftitle.returnvalues; + + Request handle, if process is successful; + + + &false;, if process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_prepare</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_execute + cubrid_bind + + + + + + + diff --git a/reference/cubrid/functions/cubrid-put.xml b/reference/cubrid/functions/cubrid-put.xml new file mode 100644 index 0000000000..dfae5e7c5e --- /dev/null +++ b/reference/cubrid/functions/cubrid-put.xml @@ -0,0 +1,111 @@ + + + + + + cubrid_put + Is used to update an attribute + + + + &reftitle.description; + + intcubrid_put + intconn_handle + stringoid + stringattr + mixedvalue + + + The cubrid_put function is used to update an attribute of the instance of the given oid. You can update single attribute by using string data type to set attr. In such case, you can use integer, float-point, or string type data for the value argument. To update multiple number of attributes, you can disregard the attr argument, and set value argument with associative array data type. However, you cannot use the method for attribute of collection type. You have to use APIs related to collection type (cubrid_set_add, cubrid_set_drop, etc) when you want to use cubrid_put on collection typed attribute. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance that you want to update. + + + attr + Name of the attribute that you want to update. + + + value + New value that you want to assign to the attribute. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_put</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_get + cubrid_set_add + cubrid_set_drop + cubrid_seq_insert + cubrid_seq_drop + cubrid_seq_put + + + + + + + diff --git a/reference/cubrid/functions/cubrid-rollback.xml b/reference/cubrid/functions/cubrid-rollback.xml new file mode 100644 index 0000000000..283d10d5d3 --- /dev/null +++ b/reference/cubrid/functions/cubrid-rollback.xml @@ -0,0 +1,99 @@ + + + + + + cubrid_rollback + Executes rollback on the transaction + + + + &reftitle.description; + + intcubrid_rollback + intconn_handle + + + The cubrid_rollback function executes rollback on the transaction pointed by conn_handle, currently in progress. + + + Connection to server is closed after calling cubrid_rollback. Connection handle, however, is still valid. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_rollback</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_commit + cubrid_disconnect + + + + + + + diff --git a/reference/cubrid/functions/cubrid-save-to-glo.xml b/reference/cubrid/functions/cubrid-save-to-glo.xml new file mode 100644 index 0000000000..bc604999fc --- /dev/null +++ b/reference/cubrid/functions/cubrid-save-to-glo.xml @@ -0,0 +1,107 @@ + + + + + + cubrid_save_to_glo + Is used to save requested file + + + + &reftitle.description; + + intcubrid_save_to_glo + intconn_handle + stringoid + stringfile_name + + + The cubrid_save_to_glo function is used to save requested file in a glo instance. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the glo instance that you want to save a file in. + + + file_name + The name of the file that you want to save. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_save_to_glo</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_new_glo + cubrid_load_from_glo + cubrid_send_glo + + + + + + + diff --git a/reference/cubrid/functions/cubrid-schema.xml b/reference/cubrid/functions/cubrid-schema.xml new file mode 100644 index 0000000000..345836240e --- /dev/null +++ b/reference/cubrid/functions/cubrid-schema.xml @@ -0,0 +1,97 @@ + + + + + + cubrid_schema + Is used to get the requested schema information + + + + &reftitle.description; + + mixedcubrid_schema + intconn_handle + intschema_type + stringclass_name + stringattr_name + + + The cubrid_schema function is used to get the requested schema information from database. You have to designate class_name, if you want to get information on certain class, attr_name, if you want to get information on certain attribute (can be used only with CUBRID_ SCH_ATTR_PRIVILEGE). + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + schema_type + Schema data that you want to know. + + + class_name + Class you want to know the schema of. + + + attr_name + Attribute you want to know the schema of. + + + + + + + &reftitle.returnvalues; + + array containing the schema information, when process is successful; + + + -1, when process is unsuccessful + + + + + &reftitle.examples; + + <function>cubrid_schema</function> example + + +]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid-send-glo.xml b/reference/cubrid/functions/cubrid-send-glo.xml new file mode 100644 index 0000000000..8c7c4a6bb9 --- /dev/null +++ b/reference/cubrid/functions/cubrid-send-glo.xml @@ -0,0 +1,100 @@ + + + + + + cubrid_send_glo + Is used to read data from glo + + + + &reftitle.description; + + intcubrid_send_glo + intconn_handle + stringoid + + + The cubrid_send_glo function is used to read data from glo instance and sends it to the PHP standard output. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the glo instance that you want to read data from. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_send_glo</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_new_glo + cubrid_save_to_glo + cubrid_load_from_glo + + + + + + + diff --git a/reference/cubrid/functions/cubrid-seq-drop.xml b/reference/cubrid/functions/cubrid-seq-drop.xml new file mode 100644 index 0000000000..a7b8522a15 --- /dev/null +++ b/reference/cubrid/functions/cubrid-seq-drop.xml @@ -0,0 +1,111 @@ + + + + + + cubrid_seq_drop + Is used to delete an element + + + + &reftitle.description; + + intcubrid_seq_drop + intconn_handle + stringoid + stringattr_name + intindex + + + The cubrid_seq_drop function is used to delete an element you request from the given sequence type attribute in the database. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance you want to work with. + + + attr_name + Name of the attribute that you want to delete an element from. + + + index + Index of the element that you want to delete (1-based). + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_seq_drop</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_seq_insert + cubrid_seq_put + + + + + + + diff --git a/reference/cubrid/functions/cubrid-seq-insert.xml b/reference/cubrid/functions/cubrid-seq-insert.xml new file mode 100644 index 0000000000..f7922d63d0 --- /dev/null +++ b/reference/cubrid/functions/cubrid-seq-insert.xml @@ -0,0 +1,109 @@ + + + + + + cubrid_seq_insert + Is used to insert an element to a sequence + + + + &reftitle.description; + + intcubrid_seq_insert + intconn_handle + stringoid + stringattr_name + intindex + stringseq_element + + + The cubrid_col_insert function is used to insert an element to a sequence type attribute in a requested location. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance you want to work with. + + + attr_name + Name of the attribute you want to insert an instance to. + + + index + Location of the element, you want to insert the element to (1-based). + + + seq_element + Content of the element that you want to insert. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_seq_insert</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_seq_drop + cubrid_seq_put + + + + + + + diff --git a/reference/cubrid/functions/cubrid-seq-put.xml b/reference/cubrid/functions/cubrid-seq-put.xml new file mode 100644 index 0000000000..dba10646b1 --- /dev/null +++ b/reference/cubrid/functions/cubrid-seq-put.xml @@ -0,0 +1,109 @@ + + + + + + cubrid_seq_put + Is used to update the content + + + + &reftitle.description; + + intcubrid_seq_put + intconn_handle + stringoid + stringattr_name + intindex + stringseq_element + + + The cubrid_seq_put function is used to update the content of the requested element in a sequent type attribute. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance you want to work with. + + + attr_name + Name of the attribute that you want to update an element. + + + index + Index (1-based) of the element that you want to update. + + + seq_element + New content that you want to use for the update. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_seq_put</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_seq_drop + cubrid_seq_insert + + + + + + + diff --git a/reference/cubrid/functions/cubrid-set-add.xml b/reference/cubrid/functions/cubrid-set-add.xml new file mode 100644 index 0000000000..3005c4f247 --- /dev/null +++ b/reference/cubrid/functions/cubrid-set-add.xml @@ -0,0 +1,103 @@ + + + + + + cubrid_set_add + Is used to insert a single element + + + + &reftitle.description; + + intcubrid_set_add + intconn_handle + stringoid + stringattr_name + stringset_element + + + The cubrid_set_add function is used to insert a single element to a set type attribute (set, multiset) you requested. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance you want to work with. + + + attr_name + Name of the attribute you want to insert an element. + + + set_element + Content of the element you want to insert. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_set_add</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_seq_drop + + + + + + + diff --git a/reference/cubrid/functions/cubrid-set-drop.xml b/reference/cubrid/functions/cubrid-set-drop.xml new file mode 100644 index 0000000000..a81e041384 --- /dev/null +++ b/reference/cubrid/functions/cubrid-set-drop.xml @@ -0,0 +1,103 @@ + + + + + + cubrid_set_drop + Is used to delete an element + + + + &reftitle.description; + + intcubrid_set_drop + intconn_handle + stringoid + stringattr_name + stringset_element + + + The cubrid_set_drop function is used to delete an element that you request from the given set type (set, multiset) attribute of the database. + + + + + &reftitle.parameters; + + + + conn_handle + Connection handle. + + + oid + Oid of the instance you want to work with. + + + attr_name + Name of the attribute you want to delete an element from. + + + set_element + Content of the element you want to delete. + + + + + + + &reftitle.returnvalues; + + &true;, when process is successful. + + + &false;, when process is unsuccessful. + + + + + &reftitle.examples; + + <function>cubrid_set_drop</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_set_add + + + + + + + diff --git a/reference/cubrid/functions/cubrid-version.xml b/reference/cubrid/functions/cubrid-version.xml new file mode 100644 index 0000000000..d764e05bc2 --- /dev/null +++ b/reference/cubrid/functions/cubrid-version.xml @@ -0,0 +1,79 @@ + + + + + + cubrid_version + Is used to get the CUBRID PHP module’s version + + + + &reftitle.description; + + stringcubrid_version + + + + The cubrid_version function is used to get the CUBRID PHP module’s version. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Version information (eg. "1.2.0"). + + + + + &reftitle.examples; + + <function>cubrid_version</function> example + + +]]> + + + + + + &reftitle.seealso; + + + cubrid_error_code + cubrid_error_code_facility + + + + + + + + diff --git a/reference/cubrid/reference.xml b/reference/cubrid/reference.xml new file mode 100644 index 0000000000..6196c2f360 --- /dev/null +++ b/reference/cubrid/reference.xml @@ -0,0 +1,30 @@ + + + + + Cubrid &Functions; + + &reference.cubrid.entities.functions; + + + + diff --git a/reference/cubrid/setup.xml b/reference/cubrid/setup.xml new file mode 100644 index 0000000000..6ea3f09af5 --- /dev/null +++ b/reference/cubrid/setup.xml @@ -0,0 +1,98 @@ + + + + + &reftitle.setup; + +
+ &reftitle.required; + + In order to have these functions available, you must install PHP API for CUBRID (CUBRID PHP API). + +
+ +
+ &reftitle.install; + + From the CUBRID homepage (CUBRID), download the PHP module. + +
+Installing PHP for Windows + + Create a directory named CUBRID in the directory where PHP is installed, and then copy the cubrid_err.msg file and the .dll file of the cubrid_php version you just downloaded. If you download CUBRID PHP version 5.1.4, add required settings as shown in the example below by editing the php.ini file. + + + + + + Once the configuration is complete, restart the web server. If you can see the CUBRID information as shown below when you check the PHP configuration using the phpinfo() function of PHP, it means that the installation was successful. + +
+
+ Installing PHP for Linux + + Unlike Windows, Linux provides its source code. Download the source code from the CUBRID homepage (CUBRID), and install it by following the INSTALL file of the compressed file. Also in the Linux version, edit and save the php.ini file, and then restart the web server. + + + + + + Check the configuration using phpinfo() function. + + + + + + As with the Windows version of PHP, if you can see the CUBRID information on the web browser, it means that the installation was successful. + +
+
+ +
+ &reftitle.runtime; + &no.config; +
+ +
+ &reftitle.resources; + + There are two resource types used in the CUBRID. The first one is the link identifier for a database connection, the second a resource which holds the result of a query. + +
+ +
+ + diff --git a/reference/cubrid/versions.xml b/reference/cubrid/versions.xml new file mode 100644 index 0000000000..9a7e6ac08e --- /dev/null +++ b/reference/cubrid/versions.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file