From e50b492aee28b1fb83a7f66c7713016e7dda8fcf Mon Sep 17 00:00:00 2001 From: Esen Sagynov Date: Fri, 20 Aug 2010 09:35:20 +0000 Subject: [PATCH] New functions added. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@302537 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../cubrid/functions/cubrid-data-seek.xml | 112 ++++++++++++ .../cubrid/functions/cubrid_fetch_assoc.xml | 106 +++++++++++ .../cubrid/functions/cubrid_fetch_field.xml | 167 ++++++++++++++++++ .../cubrid/functions/cubrid_fetch_lengths.xml | 101 +++++++++++ .../cubrid/functions/cubrid_fetch_object.xml | 102 +++++++++++ .../cubrid/functions/cubrid_fetch_row.xml | 101 +++++++++++ .../cubrid/functions/cubrid_field_flags.xml | 102 +++++++++++ .../cubrid/functions/cubrid_field_len.xml | 103 +++++++++++ .../cubrid/functions/cubrid_field_name.xml | 104 +++++++++++ .../cubrid/functions/cubrid_field_seek.xml | 127 +++++++++++++ .../cubrid/functions/cubrid_field_table.xml | 104 +++++++++++ .../cubrid/functions/cubrid_field_type.xml | 104 +++++++++++ .../cubrid/functions/cubrid_free_result.xml | 99 +++++++++++ .../cubrid/functions/cubrid_get_charset.xml | 91 ++++++++++ .../functions/cubrid_get_client_info.xml | 80 +++++++++ .../functions/cubrid_get_db_parameter.xml | 100 +++++++++++ .../functions/cubrid_get_server_info.xml | 91 ++++++++++ .../cubrid/functions/cubrid_insert_id.xml | 106 +++++++++++ .../cubrid/functions/cubrid_list_dbs.xml | 92 ++++++++++ .../cubrid/functions/cubrid_num_fields.xml | 100 +++++++++++ .../functions/cubrid_real_escape_string.xml | 96 ++++++++++ reference/cubrid/functions/cubrid_result.xml | 107 +++++++++++ .../functions/cubrid_unbuffered_query.xml | 95 ++++++++++ reference/cubrid/versions.xml | 25 ++- 24 files changed, 2414 insertions(+), 1 deletion(-) create mode 100644 reference/cubrid/functions/cubrid-data-seek.xml create mode 100644 reference/cubrid/functions/cubrid_fetch_assoc.xml create mode 100644 reference/cubrid/functions/cubrid_fetch_field.xml create mode 100644 reference/cubrid/functions/cubrid_fetch_lengths.xml create mode 100644 reference/cubrid/functions/cubrid_fetch_object.xml create mode 100644 reference/cubrid/functions/cubrid_fetch_row.xml create mode 100644 reference/cubrid/functions/cubrid_field_flags.xml create mode 100644 reference/cubrid/functions/cubrid_field_len.xml create mode 100644 reference/cubrid/functions/cubrid_field_name.xml create mode 100644 reference/cubrid/functions/cubrid_field_seek.xml create mode 100644 reference/cubrid/functions/cubrid_field_table.xml create mode 100644 reference/cubrid/functions/cubrid_field_type.xml create mode 100644 reference/cubrid/functions/cubrid_free_result.xml create mode 100644 reference/cubrid/functions/cubrid_get_charset.xml create mode 100644 reference/cubrid/functions/cubrid_get_client_info.xml create mode 100644 reference/cubrid/functions/cubrid_get_db_parameter.xml create mode 100644 reference/cubrid/functions/cubrid_get_server_info.xml create mode 100644 reference/cubrid/functions/cubrid_insert_id.xml create mode 100644 reference/cubrid/functions/cubrid_list_dbs.xml create mode 100644 reference/cubrid/functions/cubrid_num_fields.xml create mode 100644 reference/cubrid/functions/cubrid_real_escape_string.xml create mode 100644 reference/cubrid/functions/cubrid_result.xml create mode 100644 reference/cubrid/functions/cubrid_unbuffered_query.xml diff --git a/reference/cubrid/functions/cubrid-data-seek.xml b/reference/cubrid/functions/cubrid-data-seek.xml new file mode 100644 index 0000000000..f40d1d73e8 --- /dev/null +++ b/reference/cubrid/functions/cubrid-data-seek.xml @@ -0,0 +1,112 @@ + + + + + + cubrid_data_seek + Moves the internal row pointer of the CUBRID result + + + + &reftitle.description; + + boolcubrid_data_seek + intresult + introw_number + + + This function performs the moving of the internal row pointer of the CUBRID result (associated with the specified result identifier) to point to a specific row number. There are functions, such as cubrid_fetch_assoc, which use the current stored value of row number. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + row_number + This is the desired row number of the new result pointer. + + + + + + + &reftitle.returnvalues; + + &true; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_data_seek</function> example + +"; + + echo "seek to row 2 and fetching fields: "; + cubrid_data_seek($result, 2); + $row = cubrid_fetch_assoc($result); + echo $row["name"]."|". $row["address"]."|".$row["salary"]."
"; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_fetch_assoc.xml b/reference/cubrid/functions/cubrid_fetch_assoc.xml new file mode 100644 index 0000000000..1c2e0b52e1 --- /dev/null +++ b/reference/cubrid/functions/cubrid_fetch_assoc.xml @@ -0,0 +1,106 @@ + + + + + + cubrid_fetch_assoc + Returns the associative array that corresponds to the fetched row + + + + &reftitle.description; + + arraycubrid_fetch_assoc + intresult + + + This function returns the associative array, that corresponds to the fetched row and, then, moves the internal data pointer ahead, or it returns FALSE when the end is reached. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + Associative array, when process is successful. + + + &false; when the end is reached. + + + + + &reftitle.examples; + + <function>cubrid_fetch_assoc</function> example + +"; + + echo "seek to row 2 and fetching fields: "; + cubrid_data_seek($result, 2); + $row = cubrid_fetch_assoc($result); + echo $row["name"]."|". $row["address"]."|".$row["salary"]."
"; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_fetch_field.xml b/reference/cubrid/functions/cubrid_fetch_field.xml new file mode 100644 index 0000000000..a6ef39108a --- /dev/null +++ b/reference/cubrid/functions/cubrid_fetch_field.xml @@ -0,0 +1,167 @@ + + + + + + cubrid_fetch_field + Returns an object with certain properties + + + + &reftitle.description; + + objectcubrid_fetch_field + intresult + intfield_offset = 0 + + + This function returns an object with certain properties of the specific column. The properties of the object are: + + + + + name + column name + + + table + name of the table that the column belongs to + + + def + default value of the column + + + max_length + maximum length of the column + + + not_null + 1 if the column cannot be NULL + + + unique_key + 1 if the column is an unique key + + + multiple_key + 1 if the column is a non-unique key + + + numeri + 1 if the column is numeric + + + type + the type of the column + + + + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. If the field offset is not specified, the next field (that was not yet retrieved by this function) is retrieved. The field_offset starts at 0. + + + + + + + &reftitle.returnvalues; + + Object with certain properties of the specific column, when process is successful. + + + &false; or -1 on failure. + + + + + &reftitle.examples; + + <function>cubrid_fetch_field</function> example + +\n"; + } + echo "
+        max_length:        $meta->max_length
+        multiple_key:        $meta->multiple_key
+        name:            $meta->name
+        not_null:        $meta->not_null
+        numeric:        $meta->numeric
+        table:            $meta->table
+        type:            $meta->type
+        default:        $meta->def
+        unique_key:        $meta->unique_key
+        
"; + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_fetch_lengths.xml b/reference/cubrid/functions/cubrid_fetch_lengths.xml new file mode 100644 index 0000000000..396cfa9ad8 --- /dev/null +++ b/reference/cubrid/functions/cubrid_fetch_lengths.xml @@ -0,0 +1,101 @@ + + + + + + cubrid_fetch_lengths + Returns an array with the lengths of the values of each field from the current row + + + + &reftitle.description; + + arraycubrid_fetch_lengths + intresult + + + This function returns an array with the lengths of the values of each field from the current row of the result set or it returns FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + An array, when process is successful. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_fetch_lengths</function> example + +"; + print_r($lengths); + cubrid_close_request($result); + } +?> +]]> + + &example.outputs; + + Peter [address] => 1st Avenue, New York [salary] => 1000.0000000000000000 ) +Array ( [0] => 5 [1] => 20 [2] => 21 ) +]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid_fetch_object.xml b/reference/cubrid/functions/cubrid_fetch_object.xml new file mode 100644 index 0000000000..1cebb2e8c2 --- /dev/null +++ b/reference/cubrid/functions/cubrid_fetch_object.xml @@ -0,0 +1,102 @@ + + + + + + cubrid_fetch_object + Returns an object with the column names + + + + &reftitle.description; + + objectcubrid_fetch_object + intresult + + + This function returns an object with the column names of the result set as properties. The values of these properties are extracted from the current row of the result. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + An object, when process is successful. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_fetch_object</function> example + +name."
"; + echo $row->address."
"; + echo $row->salary; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_fetch_row.xml b/reference/cubrid/functions/cubrid_fetch_row.xml new file mode 100644 index 0000000000..07f34ff73a --- /dev/null +++ b/reference/cubrid/functions/cubrid_fetch_row.xml @@ -0,0 +1,101 @@ + + + + + + cubrid_fetch_row + Returns a numerical array with the values of the current row + + + + &reftitle.description; + + arraycubrid_fetch_row + intresult + + + This function returns a numerical array with the values of the current row from the result set, starting from 0. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + A numerical array, when process is successful. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_fetch_row</function> example + +".$row[1]."
".$row[2]."
"; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_field_flags.xml b/reference/cubrid/functions/cubrid_field_flags.xml new file mode 100644 index 0000000000..e6d271d294 --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_flags.xml @@ -0,0 +1,102 @@ + + + + + + cubrid_field_flags + Returns a string with the flags of the given field offset + + + + &reftitle.description; + + stringcubrid_field_flags + intresult + intfield_offset + + + This function returns a string with the flags of the given field offset separated by space. You can split the returned value using explode. The possible flags could be: not_null, primary_key, unique_key, foreign_key, auto_increment, shared, reverse_index, reverse_unique and timestamp. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + A string with flags, when process is successful. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_flags</function> example + + +]]> + + &example.outputs; + + not_null [1] => unique_key [2] => auto_increment ) +]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid_field_len.xml b/reference/cubrid/functions/cubrid_field_len.xml new file mode 100644 index 0000000000..fe66a12710 --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_len.xml @@ -0,0 +1,103 @@ + + + + + + cubrid_field_len + Returns the maximum length of the specified field + + + + &reftitle.description; + + intcubrid_field_len + intresult + intfield_offset + + + This function returns the maximum length of the specified field on success, or it returns FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + Maximum length, when process is successful. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_len</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_field_name.xml b/reference/cubrid/functions/cubrid_field_name.xml new file mode 100644 index 0000000000..ac37ca3230 --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_name.xml @@ -0,0 +1,104 @@ + + + + + + cubrid_field_name + Returns the name of the specified field index + + + + &reftitle.description; + + stringcubrid_field_name + intresult + intfield_offset + + + This function returns the name of the specified field index on success or it returns FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + Name of specified field index, on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_name</function> example + +"; + echo cubrid_field_name($result, 2); + + cubrid_close_request($result); + } +?> +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_field_seek.xml b/reference/cubrid/functions/cubrid_field_seek.xml new file mode 100644 index 0000000000..811a74b4ed --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_seek.xml @@ -0,0 +1,127 @@ + + + + + + cubrid_field_seek + Moves the result set cursor to the specified field offset + + + + &reftitle.description; + + boolcubrid_field_seek + intresult + intfield_offset + + + This function moves the result set cursor to the specified field offset. This offset is used by cubrid_fetch_field if it doesn't include a field offset. It returns TRUE on success or FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + &true; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_seek</function> example + +\n"; + } + echo "
+        max_length:        $meta->max_length
+        multiple_key:        $meta->multiple_key
+        name:            $meta->name
+        not_null:        $meta->not_null
+        numeric:        $meta->numeric
+        table:            $meta->table
+        type:            $meta->type
+        default:        $meta->def
+        unique_key:        $meta->unique_key
+        
"; + + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_field_table.xml b/reference/cubrid/functions/cubrid_field_table.xml new file mode 100644 index 0000000000..51100d17b7 --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_table.xml @@ -0,0 +1,104 @@ + + + + + + cubrid_field_table + Returns the name of the table of the specified field + + + + &reftitle.description; + + stringcubrid_field_table + intresult + intfield_offset + + + This function returns the name of the table of the specified field. This is useful when using large select queries with JOINS. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + Name of the table of the specified field, on success. + + + &false; or -1 on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_table</function> example + +". cubrid_field_name($result, 0) . ") is from table " . cubrid_field_table($result, 0) . "
"; + echo "Field 1 (". cubrid_field_name($result, 1) . ") is from table " . cubrid_field_table($result, 1) . "
"; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_field_type.xml b/reference/cubrid/functions/cubrid_field_type.xml new file mode 100644 index 0000000000..5e12e1c1f5 --- /dev/null +++ b/reference/cubrid/functions/cubrid_field_type.xml @@ -0,0 +1,104 @@ + + + + + + cubrid_field_type + Returns the type of the column corresponding to the given field offset + + + + &reftitle.description; + + stringcubrid_field_type + intresult + intfield_offset + + + This function returns the type of the column corresponding to the given field offset. The returned field type could be one of the following: "int", "real", "string", etc. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + field_offset + The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued. + + + + + + + &reftitle.returnvalues; + + Type of the column, on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_field_type</function> example + +". cubrid_field_name($result, 0) . ") has type " . cubrid_field_type($result, 0) . "
"; + echo "Field 1 (". cubrid_field_name($result, 1) . ") has type " . cubrid_field_type($result, 1) . "
"; + + cubrid_close_request($result); + } +?> +]]> +
+ &example.outputs; + + + +
+
+ +
+ + diff --git a/reference/cubrid/functions/cubrid_free_result.xml b/reference/cubrid/functions/cubrid_free_result.xml new file mode 100644 index 0000000000..b20f5c679b --- /dev/null +++ b/reference/cubrid/functions/cubrid_free_result.xml @@ -0,0 +1,99 @@ + + + + + + cubrid_free_result + Frees the memory occupied by the result data + + + + &reftitle.description; + + boolcubrid_free_result + resourceresult + + + This function frees the memory occupied by the result data. It returns TRUE on success or FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + &true; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_free_result</function> example + +".$row['address']; + } +?> +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_get_charset.xml b/reference/cubrid/functions/cubrid_get_charset.xml new file mode 100644 index 0000000000..a343417321 --- /dev/null +++ b/reference/cubrid/functions/cubrid_get_charset.xml @@ -0,0 +1,91 @@ + + + + + + cubrid_get_charset + Returns the current CUBRID connection charset + + + + &reftitle.description; + + stringcubrid_get_charset + intlink_identifier + + + This function returns This function returns the current CUBRID connection charset. + + + + + &reftitle.parameters; + + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + A string that represents the CUBRID connection charset; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_get_charset</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_get_client_info.xml b/reference/cubrid/functions/cubrid_get_client_info.xml new file mode 100644 index 0000000000..accc8c6b63 --- /dev/null +++ b/reference/cubrid/functions/cubrid_get_client_info.xml @@ -0,0 +1,80 @@ + + + + + + cubrid_get_client_info + Returns a string that represents the client library version + + + + &reftitle.description; + + stringcubrid_get_client_info + + + + This function returns a string that represents the client library version. + + + + + &reftitle.parameters; + + + + + + + &reftitle.returnvalues; + + A string that represents the client library version; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_get_client_info</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_get_db_parameter.xml b/reference/cubrid/functions/cubrid_get_db_parameter.xml new file mode 100644 index 0000000000..7158b30596 --- /dev/null +++ b/reference/cubrid/functions/cubrid_get_db_parameter.xml @@ -0,0 +1,100 @@ + + + + + + cubrid_get_db_parameter + Returns the CUBRID database parameters + + + + &reftitle.description; + + arraycubrid_get_db_parameter + intlink_identifier + + + This function returns the CUBRID database parameters or it returns FALSE on failure. It returns an array with the values for the following parameters: + + + + CCI_PARAM_ISOLATION_LEVEL + CCI_PARAM_LOCK_TIMEOUT + CCI_PARAM_MAX_STRING_LENGTH + CCI_PARAM_AUTO_COMMIT + + + + + + &reftitle.parameters; + + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + An array with CUBRID database parameters; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_get_db_parameter</function> example + +"; + print_r(cubrid_get_db_parameter($link)); +?> +]]> + + &example.outputs; + + 3 [LOCK_TIMEOUT] => -1 [MAX_STRING_LENGTH] => 1073741823 ) +]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid_get_server_info.xml b/reference/cubrid/functions/cubrid_get_server_info.xml new file mode 100644 index 0000000000..0c48c049ea --- /dev/null +++ b/reference/cubrid/functions/cubrid_get_server_info.xml @@ -0,0 +1,91 @@ + + + + + + cubrid_get_server_info + Returns a string that represents the CUBRID server version + + + + &reftitle.description; + + stringcubrid_get_server_info + intlink_identifier + + + This function returns a string that represents the CUBRID server version. + + + + + &reftitle.parameters; + + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + A string that represents the CUBRID server version; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_get_server_info</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_insert_id.xml b/reference/cubrid/functions/cubrid_insert_id.xml new file mode 100644 index 0000000000..4389a5ddbc --- /dev/null +++ b/reference/cubrid/functions/cubrid_insert_id.xml @@ -0,0 +1,106 @@ + + + + + + cubrid_insert_id + Returns an array with the IDs generated for the AUTO_INCREMENT columns + + + + &reftitle.description; + + arraycubrid_insert_id + stringclass_name + intconnection_handle + + + This function returns an array with the IDs generated for the AUTO_INCREMENT columns that were updated by the previous INSERT query. It returns an array with all the AUTO_INCREMENT columns and their values. It returns 0 if the previous query does not generate new rows, or it returns FALSE on failure. + + + + + &reftitle.parameters; + + + + class_name + The name of the class (table) that was used in the last INSERT statement for which the auto increment values are retrieved. + + + connection_handle + The connection handle previously obtained by a call to cubrid_connect. + + + + + + + &reftitle.returnvalues; + + An array with all the AUTO_INCREMENT columns and their values, on success. + + + 0, if the previous query does not generate new rows. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_insert_id</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_list_dbs.xml b/reference/cubrid/functions/cubrid_list_dbs.xml new file mode 100644 index 0000000000..cae5b5d064 --- /dev/null +++ b/reference/cubrid/functions/cubrid_list_dbs.xml @@ -0,0 +1,92 @@ + + + + + + cubrid_list_dbs + Returns an array with the list of all existing Cubrid databases + + + + &reftitle.description; + + arraycubrid_list_dbs + intlink_identifier + + + This function returns an array with the list of all existing Cubrid databases. + + + + + &reftitle.parameters; + + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + An array with all existing Cubrid databases; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_list_dbs</function> example + +"; + print_r(cubrid_list_dbs($link)); +?> +]]> + + &example.outputs; + + demodb2 [1] => cubrid3 ) +]]> + + + + + + + diff --git a/reference/cubrid/functions/cubrid_num_fields.xml b/reference/cubrid/functions/cubrid_num_fields.xml new file mode 100644 index 0000000000..dc6f52d244 --- /dev/null +++ b/reference/cubrid/functions/cubrid_num_fields.xml @@ -0,0 +1,100 @@ + + + + + + cubrid_num_fields + Returns the number of columns in the result set + + + + &reftitle.description; + + intcubrid_num_fields + intresult + + + This function returns the number of columns in the result set, on success, or it returns FALSE on failure. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + + + + + &reftitle.returnvalues; + + Number of columns, on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_num_fields</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_real_escape_string.xml b/reference/cubrid/functions/cubrid_real_escape_string.xml new file mode 100644 index 0000000000..d05a0c7924 --- /dev/null +++ b/reference/cubrid/functions/cubrid_real_escape_string.xml @@ -0,0 +1,96 @@ + + + + + + cubrid_real_escape_string + Returns the escaped string version of the given string + + + + &reftitle.description; + + stringcubrid_real_escape_string + stringunescaped_string + resourcelink_identifier + + + This function returns the escaped string version of the given string. It pre-appends backslashes to the following characters: \x00, \n, \r, \, ', ". This function must always (with few exceptions) be used to make data safe before sending a query to CUBRID. + + + + + &reftitle.parameters; + + + + unescaped_string + The string that is to be escaped. + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + Escaped string version of the given string, on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_real_escape_string</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_result.xml b/reference/cubrid/functions/cubrid_result.xml new file mode 100644 index 0000000000..6ffa5b75f8 --- /dev/null +++ b/reference/cubrid/functions/cubrid_result.xml @@ -0,0 +1,107 @@ + + + + + + cubrid_result + Returns the value of a specific field in a specific row + + + + &reftitle.description; + + stringcubrid_result + intresult + introw + mixedfield = 0 + + + This function returns the value of a specific field in a specific row from a result set. + + + + + &reftitle.parameters; + + + + result + This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute. + + + row + The row number from the result that is being retrieved. Row numbers start at 0. + + + field + The name or offset of the field being retrieved. It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved. + + + + + + + &reftitle.returnvalues; + + Value of a specific field, on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_result</function> example + + +]]> + + &example.outputs; + + + + + + + + + diff --git a/reference/cubrid/functions/cubrid_unbuffered_query.xml b/reference/cubrid/functions/cubrid_unbuffered_query.xml new file mode 100644 index 0000000000..0638b8b1cd --- /dev/null +++ b/reference/cubrid/functions/cubrid_unbuffered_query.xml @@ -0,0 +1,95 @@ + + + + + + cubrid_unbuffered_query + Performs a query without fetching the results into memory + + + + &reftitle.description; + + resourcecubrid_unbuffered_query + stringquery + intlink_identifier + + + This function performs a query without fetching the results into memory. + + + Known issue: it currently uses the normal version - the one that fetches the results. + + + + + &reftitle.parameters; + + + + query + A SQL query. + + + link_identifier + The CUBRID connection. If the link identifier is not specified, the last link opened by cubrid_connect is assumed. + + + + + + + &reftitle.returnvalues; + + For SELECT, SHOW, DESCRIBE or EXPLAIN statements returns a resource on success. + + + For other type of SQL statements, UPDATE, DELETE, DROP, etc, returns &true; on success. + + + &false; on failure. + + + + + &reftitle.examples; + + <function>cubrid_unbuffered_query</function> example + + +]]> + + + + + + + diff --git a/reference/cubrid/versions.xml b/reference/cubrid/versions.xml index a67c4e8e66..1e4feac188 100644 --- a/reference/cubrid/versions.xml +++ b/reference/cubrid/versions.xml @@ -20,6 +20,7 @@ + @@ -27,18 +28,39 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -48,6 +70,7 @@ +