diff --git a/functions/ingres_ii.xml b/functions/ingres_ii.xml index 06191c8482..8859b8716a 100755 --- a/functions/ingres_ii.xml +++ b/functions/ingres_ii.xml @@ -1,5 +1,5 @@ - + Ingres II functions Ingres II @@ -20,29 +20,32 @@ When using this extension with Apache, if Apache does not start - and complains with "PHP Fatal error: Unable to start - ingres_ii module in Unknown on line 0" - then make sure the environement variable II_SYSTEM is correctly - set. Adding "export II_SYSTEM="/home/ingres/II" in the script - that starts Apache, just before launching httpd, should be fine. + and complains with "PHP Fatal error: Unable to start ingres_ii + module in Unknown on line 0" then make sure the environement + variable II_SYSTEM is correctly set. Adding "export + II_SYSTEM="/home/ingres/II" in the script that starts Apache, just + before launching httpd, should be fine. - If you already used PHP extensions to access other database servers, - note that Ingres doesn't allow concurrent queries and/or transaction - over one connection, thus you won't find any result or transaction - handle in this extension. The result of a query must be treated - before sending another query, and a transaction must be commited or - rolled back before opening another transaction (which is automaticaly - done when sending the first query). + If you already used PHP extensions to access other database + servers, note that Ingres doesn't allow concurrent queries and/or + transaction over one connection, thus you won't find any result + or transaction handle in this extension. The result of a query + must be treated before sending another query, and a transaction + must be commited or rolled back before opening another + transaction (which is automaticaly done when sending the first + query). - ingres_connect - Open a connection to an Ingres II database. + ingres_connect + + Open a connection to an Ingres II database + Description @@ -60,20 +63,22 @@ - &warn.experimental.func; + &warn.experimental.func; - Returns a Ingres II link resource on success, or &false; on failure. + Returns a Ingres II link resource on success, or &false; on + failure. ingres_connect opens a connection with the - Ingres database designated by database, which - follows the syntax [node_id::]dbname[/svr_class]. + Ingres database designated by database, + which follows the syntax + [node_id::]dbname[/svr_class]. If some parameters are missing, ingres_connect uses the values in php.ini for ingres.default_database, - ingres.default_user and + ingres.default_user, and ingres.default_password. @@ -97,8 +102,9 @@ - <function>ingres_connect</function> example - using default link + + <function>ingres_connect</function> example using default link + <?php ingres_connect ("mydb", "user", "pass") @@ -109,7 +115,7 @@ See also - ingres_pconnect, and + ingres_pconnect and ingres_close. @@ -119,7 +125,7 @@ ingres_pconnect - Open a persistent connection to an Ingres II database. + Open a persistent connection to an Ingres II database @@ -138,27 +144,28 @@ - &warn.experimental.func; + &warn.experimental.func; - Returns a Ingres II link resource on success, or &false; on failure. + Returns a Ingres II link resource on success, or &false; on + failure. - See ingres_connect for parameters details and - examples. There are only 2 differences between + See ingres_connect for parameters details + and examples. There are only 2 differences between ingres_pconnect and - ingres_connect : - First, when connecting, the function will first try to find a - (persistent) link that's already opened with the same parameters. - If one is found, an identifier for it will be returned instead of - opening a new connection. Second, the connection to the Ingres - server will not be closed when the execution of the script ends. - Instead, the link will remain open for future use - (ingres_close will not close links established - by ingres_pconnect). This type of link is - therefore called 'persistent'. + ingres_connect : First, when connecting, the + function will first try to find a (persistent) link that's + already opened with the same parameters. If one is found, an + identifier for it will be returned instead of opening a new + connection. Second, the connection to the Ingres server will not + be closed when the execution of the script ends. Instead, the + link will remain open for future use + (ingres_close will not close links + established by ingres_pconnect). This type + of link is therefore called 'persistent'. See also - ingres_connect, and + ingres_connect and ingres_close. @@ -179,7 +186,7 @@ - &warn.experimental.func; + &warn.experimental.func; Returns &true; on success, or &false; on failure. @@ -195,7 +202,7 @@ are automatically closed at the end of the script. See also - ingres_connect, and + ingres_connect and ingres_pconnect. @@ -219,7 +226,7 @@ - &warn.experimental.func; + &warn.experimental.func; Returns &true; on success, or &false; on failure. @@ -229,42 +236,55 @@ must be a valid SQL query (see the Ingres SQL reference guide) - The query becomes part of the currently open transaction. - If there is no open transaction, ingres_query + The query becomes part of the currently open transaction. If + there is no open transaction, ingres_query opens a new transaction. To close the transaction, you can either - call ingres_commit to commit the changes made - to the database or ingres_rollback to cancel these - changes. When the script ends, any open transaction is rolled back - (by calling ingres_rollback). You can also - use ingres_autocommit before opening a new + call ingres_commit to commit the changes + made to the database or ingres_rollback to + cancel these changes. When the script ends, any open transaction + is rolled back (by calling + ingres_rollback). You can also use + ingres_autocommit before opening a new transaction to have every SQL query immediatly commited. - Some types of SQL queries can't be sent with this function : + Some types of SQL queries can't be sent with this function: - close (see ingres_close). + + close (see ingres_close) + - commit (see ingres_commit). + + commit (see ingres_commit) + - - connect (see ingres_connect). - - - disconnect (see ingres_close). - - get dbevent - prepare to commit - rollback (see ingres_rollback). + connect (see ingres_connect) + + + + + disconnect (see ingres_close) + + + + get dbevent + + + prepare to commit + + + + rollback (see ingres_rollback) savepoint - set autocommit (see ingres_autocommit). + set autocommit (see ingres_autocommit) @@ -294,7 +314,7 @@ while ($row = ingres_fetch_row()) { ingres_fetch_object, ingres_fetch_row, ingres_commit, - ingres_rollback and + ingres_rollback, and ingres_autocommit. @@ -317,7 +337,7 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; For delete, insert or update queries, ingres_num_rows returns the number of rows @@ -329,17 +349,16 @@ while ($row = ingres_fetch_row()) { This function is mainly meant to get the number of rows - modified in the database. - If this function is called before using - ingres_fetch_array, + modified in the database. If this function is called before + using ingres_fetch_array, ingres_fetch_object or ingres_fetch_row the server will delete the result's data and the script won't be able to get them. - You should instead retrieve the result's data using one of these - fetch functions in a loop until it returns &false;, indicating that - no more results are available. + You should instead retrieve the result's data using one of + these fetch functions in a loop until it returns &false;, + indicating that no more results are available. @@ -347,7 +366,7 @@ while ($row = ingres_fetch_row()) { See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -370,17 +389,17 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_num_fields returns the number of fields - in the results returned by the Ingres server after a call to - ingres_query + ingres_num_fields returns the number of + fields in the results returned by the Ingres server after a call + to ingres_query See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -404,7 +423,7 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; ingres_field_name returns the name of a field in a query result, or &false; on failure. @@ -426,8 +445,10 @@ while ($row = ingres_fetch_row()) { - ingres_field_type - Get the type of a field in a query result. + ingres_field_type + + Get the type of a field in a query result + Description @@ -442,28 +463,28 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_field_type returns the type of a field - in a query result, or &false; on failure. - Examples of types returned are "IIAPI_BYTE_TYPE", - "IIAPI_CHA_TYPE", "IIAPI_DTE_TYPE", "IIAPI_FLT_TYPE", - "IIAPI_INT_TYPE", "IIAPI_VCH_TYPE". Some of these types can map - to more than one SQL type depending on the length of the field - (see ingres_field_length). For example + ingres_field_type returns the type of a + field in a query result, or &false; on failure. Examples of + types returned are "IIAPI_BYTE_TYPE", "IIAPI_CHA_TYPE", + "IIAPI_DTE_TYPE", "IIAPI_FLT_TYPE", "IIAPI_INT_TYPE", + "IIAPI_VCH_TYPE". Some of these types can map to more than one + SQL type depending on the length of the field (see + ingres_field_length). For example "IIAPI_FLT_TYPE" can be a float4 or a float8. For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. - index is the number of the field and must be - between 1 and the value given by + index is the number of the field and must + be between 1 and the value given by ingres_num_fields. See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -472,7 +493,7 @@ while ($row = ingres_fetch_row()) { ingres_field_nullable - Test if a field is nullable. + Test if a field is nullable Description @@ -487,21 +508,21 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_field_nullable returns &true; if the field - can be set to the &null; value and &false; if it can't. + ingres_field_nullable returns &true; if the + field can be set to the &null; value and &false; if it can't. - index is the number of the field and must be - between 1 and the value given by + index is the number of the field and must + be between 1 and the value given by ingres_num_fields. See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -510,7 +531,7 @@ while ($row = ingres_fetch_row()) { ingres_field_length - Get the length of a field. + Get the length of a field Description @@ -525,22 +546,23 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_field_length returns the length of a field. - This is the number of bytes used by the server to store the field. - For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. + ingres_field_length returns the length of a + field. This is the number of bytes used by the server to store + the field. For detailed information, see the Ingres/OpenAPI User + Guide - Appendix C. - index is the number of the field and must be - between 1 and the value given by + index is the number of the field and must + be between 1 and the value given by ingres_num_fields. See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -549,38 +571,39 @@ while ($row = ingres_fetch_row()) { ingres_field_precision - Get the precision of a field. + Get the precision of a field Description - int ingres_field_precision - int - index + int + ingres_field_precision + + int index resource link - &warn.experimental.func; + &warn.experimental.func; - ingres_field_precision returns the precision of - a field. This value is used only for decimal, float and money SQL data - types. For detailed information, see the Ingres/OpenAPI User Guide - - Appendix C. + ingres_field_precision returns the precision + of a field. This value is used only for decimal, float and money + SQL data types. For detailed information, see the Ingres/OpenAPI + User Guide - Appendix C. - index is the number of the field and must be - between 1 and the value given by + index is the number of the field and must + be between 1 and the value given by ingres_num_fields. See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -589,7 +612,7 @@ while ($row = ingres_fetch_row()) { ingres_field_scale - Get the scale of a field. + Get the scale of a field Description @@ -606,20 +629,21 @@ while ($row = ingres_fetch_row()) { &warn.experimental.func; - ingres_field_scale returns the scale of a field. - This value is used only for the decimal SQL data type. For detailed - information, see the Ingres/OpenAPI User Guide - Appendix C. + ingres_field_scale returns the scale of a + field. This value is used only for the decimal SQL data + type. For detailed information, see the Ingres/OpenAPI User Guide + - Appendix C. - index is the number of the field and must be - between 1 and the value given by + index is the number of the field and must + be between 1 and the value given by ingres_num_fields. See also ingres_query, ingres_fetch_array, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -628,7 +652,7 @@ while ($row = ingres_fetch_row()) { ingres_fetch_array - Fetch a row of result into an array. + Fetch a row of result into an array Description @@ -643,22 +667,24 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_fetch_array Returns an array that corresponds - to the fetched row, or &false; if there are no more rows. + ingres_fetch_array Returns an array that + corresponds to the fetched row, or &false; if there are no more + rows. This function is an extended version of - ingres_fetch_row. In addition to storing the - data in the numeric indices of the result array, it also stores - the data in associative indices, using the field names as keys. + ingres_fetch_row. In addition to storing + the data in the numeric indices of the result array, it also + stores the data in associative indices, using the field names as + keys. If two or more columns of the result have the same field names, - the last column will take precedence. To access the other column(s) - of the same name, you must use the numeric index of the column or - make an alias for the column. + the last column will take precedence. To access the other + column(s) of the same name, you must use the numeric index of the + column or make an alias for the column. ingres_query(select t1.f1 as foo t2.f1 as bar from t1, t2); @@ -669,8 +695,9 @@ $bar = $result["bar"]; - result_type can be INGRES_NUM for enumerated array, - INGRES_ASSOC for associative array, or INGRES_BOTH (default). + result_type can be INGRES_NUM for + enumerated array, INGRES_ASSOC for associative array, or + INGRES_BOTH (default). Speed-wise, the function is identical to @@ -701,7 +728,7 @@ while ($row = ingres_fetch_array()) { ingres_query, ingres_num_fields, ingres_field_name, - ingres_fetch_object and + ingres_fetch_object, and ingres_fetch_row. @@ -710,7 +737,9 @@ while ($row = ingres_fetch_array()) { ingres_fetch_row - Fetch a row of result into an enumerated array. + + Fetch a row of result into an enumerated array + Description @@ -722,11 +751,12 @@ while ($row = ingres_fetch_array()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_fetch_row returns an array that corresponds - to the fetched row, or &false; if there are no more rows. Each result - column is stored in an array offset, starting at offset 1. + ingres_fetch_row returns an array that + corresponds to the fetched row, or &false; if there are no more + rows. Each result column is stored in an array offset, starting + at offset 1. Subsequent call to ingres_fetch_row would @@ -753,7 +783,7 @@ while ($row = ingres_fetch_row()) { See also ingres_num_fields, ingres_query, - ingres_fetch_array and + ingres_fetch_array, and ingres_fetch_object. @@ -768,7 +798,9 @@ while ($row = ingres_fetch_row()) { Description - object ingres_fetch_object + object + ingres_fetch_object + int result_type @@ -777,10 +809,11 @@ while ($row = ingres_fetch_row()) { - &warn.experimental.func; + &warn.experimental.func; ingres_fetch_object Returns an object that - corresponds to the fetched row, or &false; if there are no more rows. + corresponds to the fetched row, or &false; if there are no more + rows. This function is similar to @@ -820,7 +853,7 @@ while ($row = ingres_fetch_object()) { ingres_query, ingres_num_fields, ingres_field_name, - ingres_fetch_array and + ingres_fetch_array, and ingres_fetch_row. @@ -829,7 +862,7 @@ while ($row = ingres_fetch_object()) { ingres_rollback - Roll back a transaction. + Roll back a transaction Description @@ -841,11 +874,11 @@ while ($row = ingres_fetch_object()) { - &warn.experimental.func; + &warn.experimental.func; - ingres_rollback rolls back the currently open - transaction, actually canceling all changes made to the database - during the transaction. + ingres_rollback rolls back the currently + open transaction, actually canceling all changes made to the + database during the transaction. This closes the transaction. A new one can be open by sending a @@ -854,7 +887,7 @@ while ($row = ingres_fetch_object()) { See also ingres_query, - ingres_commit and + ingres_commit, and ingres_autocommit. @@ -863,7 +896,7 @@ while ($row = ingres_fetch_object()) { ingres_commit - Commit a transaction. + Commit a transaction Description @@ -875,7 +908,7 @@ while ($row = ingres_fetch_object()) { - &warn.experimental.func; + &warn.experimental.func; ingres_commit commits the currently open transaction, making all changes made to the database permanent. @@ -885,14 +918,14 @@ while ($row = ingres_fetch_object()) { query with ingres_query. - You can also have the server commit automaticaly after every query - by calling ingres_autocommit before opening the - transaction. + You can also have the server commit automaticaly after every + query by calling ingres_autocommit before + opening the transaction. See also ingres_query, - ingres_rollback and + ingres_rollback, and ingres_autocommit. @@ -901,7 +934,7 @@ while ($row = ingres_fetch_object()) { ingres_autocommit - Switch autocommit on or off. + Switch autocommit on or off Description @@ -913,24 +946,25 @@ while ($row = ingres_fetch_object()) { - &warn.experimental.func; + &warn.experimental.func; ingres_autocommit is called before opening a - transaction (before the first call to ingres_query - or just after a call to ingres_rollback or - ingres_autocommit) to switch the "autocommit" mode - of the server on or off (when the script begins the autocommit mode is - off). + transaction (before the first call to + ingres_query or just after a call to + ingres_rollback or + ingres_autocommit) to switch the + "autocommit" mode of the server on or off (when the script begins + the autocommit mode is off). - When the autocommit mode is on, every query is automaticaly commited - by the server, as if ingres_commit was called - after every call to ingres_query. + When the autocommit mode is on, every query is automaticaly + commited by the server, as if ingres_commit + was called after every call to ingres_query. See also ingres_query, - ingres_rollback and + ingres_rollback, and ingres_commit.