From a228c23391b5d77eddf50c76d3dc117511113c21 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 3 Feb 2007 03:11:12 +0000 Subject: [PATCH] ref.ifx: switch to new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228815 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/ifx/functions/ifx-affected-rows.xml | 49 +++++-- .../ifx/functions/ifx-blobinfile-mode.xml | 33 ++++- reference/ifx/functions/ifx-byteasvarchar.xml | 33 ++++- reference/ifx/functions/ifx-close.xml | 51 ++++++-- reference/ifx/functions/ifx-connect.xml | 93 +++++++++---- reference/ifx/functions/ifx-copy-blob.xml | 32 ++++- reference/ifx/functions/ifx-create-blob.xml | 59 ++++++--- reference/ifx/functions/ifx-create-char.xml | 37 ++++-- reference/ifx/functions/ifx-do.xml | 45 +++++-- reference/ifx/functions/ifx-error.xml | 56 +++++--- reference/ifx/functions/ifx-errormsg.xml | 49 +++++-- reference/ifx/functions/ifx-fetch-row.xml | 85 +++++++----- .../ifx/functions/ifx-fieldproperties.xml | 44 +++++-- reference/ifx/functions/ifx-fieldtypes.xml | 38 +++++- reference/ifx/functions/ifx-free-blob.xml | 30 ++++- reference/ifx/functions/ifx-free-char.xml | 30 ++++- reference/ifx/functions/ifx-free-result.xml | 29 ++++- reference/ifx/functions/ifx-get-blob.xml | 34 ++++- reference/ifx/functions/ifx-get-char.xml | 33 ++++- reference/ifx/functions/ifx-getsqlca.xml | 62 ++++++--- .../ifx/functions/ifx-htmltbl-result.xml | 48 ++++++- reference/ifx/functions/ifx-nullformat.xml | 29 ++++- reference/ifx/functions/ifx-num-fields.xml | 37 +++++- reference/ifx/functions/ifx-num-rows.xml | 32 ++++- reference/ifx/functions/ifx-pconnect.xml | 66 ++++++++-- reference/ifx/functions/ifx-prepare.xml | 108 ++++++++++----- reference/ifx/functions/ifx-query.xml | 123 ++++++++++++------ reference/ifx/functions/ifx-textasvarchar.xml | 33 ++++- reference/ifx/functions/ifx-update-blob.xml | 39 +++++- reference/ifx/functions/ifx-update-char.xml | 39 +++++- reference/ifx/functions/ifxus-close-slob.xml | 28 +++- reference/ifx/functions/ifxus-create-slob.xml | 40 ++++-- reference/ifx/functions/ifxus-free-slob.xml | 31 ++++- reference/ifx/functions/ifxus-open-slob.xml | 47 ++++++- reference/ifx/functions/ifxus-read-slob.xml | 43 +++++- reference/ifx/functions/ifxus-seek-slob.xml | 51 +++++++- reference/ifx/functions/ifxus-tell-slob.xml | 33 ++++- reference/ifx/functions/ifxus-write-slob.xml | 43 +++++- 38 files changed, 1431 insertions(+), 361 deletions(-) diff --git a/reference/ifx/functions/ifx-affected-rows.xml b/reference/ifx/functions/ifx-affected-rows.xml index fab6794fbe..dbac11f287 100644 --- a/reference/ifx/functions/ifx-affected-rows.xml +++ b/reference/ifx/functions/ifx-affected-rows.xml @@ -1,21 +1,17 @@ - + ifx_affected_rows Get number of rows affected by a query - - Description + + + &reftitle.description; intifx_affected_rows resourceresult_id - - result_id is a valid result id returned by - ifx_query or - ifx_prepare. - Returns the number of rows affected by a query associated with result_id. @@ -33,6 +29,34 @@ Useful after ifx_prepare to limit queries to reasonable result sets. + + + + &reftitle.parameters; + + + + result_id + + + A valid result id returned by ifx_query or + ifx_prepare. + + + + + + + + + &reftitle.returnvalues; + + Returns the number of rows as an integer. + + + + + &reftitle.examples; Informix affected rows @@ -54,10 +78,17 @@ if ($rowcount > 1000) { + + + + &reftitle.seealso; - See also ifx_num_rows. + + ifx_num_rows + + + ifx_blobinfile_mode Set the default blob mode for all select queries - - Description + + + &reftitle.description; boolifx_blobinfile_mode intmode - Set the default blob mode for all select queries. Mode "0" means - save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in - a file. + Set the default blob mode for all select queries. + + + + &reftitle.parameters; + + + + mode + + + Mode "0" means save Byte-Blobs in memory, and mode "1" means save + Byte-Blobs in a file. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifx_byteasvarchar Set the default byte mode - - Description + + + &reftitle.description; boolifx_byteasvarchar intmode - Sets the default byte mode for all select-queries. Mode "0" will - return a blob id, and mode "1" will return a varchar with text - content. + Sets the default byte mode for all select-queries. + + + + &reftitle.parameters; + + + + mode + + + Mode "0" will return a blob id, and mode "1" will return a varchar + with text content. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifx_close Close Informix connection - - Description + + + &reftitle.description; boolifx_close resourcelink_identifier - - &return.success; - ifx_close closes the link to an Informix database that's associated with the specified link identifier. - If the link identifier isn't specified, the last opened link is - assumed. Note that this isn't usually necessary, as non-persistent open @@ -29,6 +25,34 @@ ifx_close will not close persistent links generated by ifx_pconnect. + + + + &reftitle.parameters; + + + + link_identifier + + + The link identifier. If not specified, the last opened link is + assumed. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; Closing a Informix connection @@ -43,11 +67,18 @@ ifx_close($conn_id); + + + + &reftitle.seealso; - See also ifx_connect and - ifx_pconnect. + + ifx_connect + ifx_pconnect + + + ifx_connect Open Informix server connection - - Description + + + &reftitle.description; resourceifx_connect stringdatabase @@ -14,30 +15,69 @@ stringpassword - Returns a connection identifier on success, or &false; on - error. + ifx_connect establishes a connection to an Informix + server. - ifx_connect establishes a connection to an - Informix server. All of the arguments are optional, and if - they're missing, defaults are taken from values supplied in configuration file - (ifx.default_host for the host (Informix libraries will use - INFORMIXSERVER environment value if not defined), - ifx.default_user for user, ifx.default_password for the password - (none if not defined). + In case a second call is made to ifx_connect with the + same arguments, no new link will be established, but instead, the link + identifier of the already opened link will be returned. - In case a second call is made to - ifx_connect with the same arguments, no - new link will be established, but instead, the link identifier of - the already opened link will be returned. - - - The link to the server will be closed as soon as the execution of - the script ends, unless it's closed earlier by explicitly calling + The link to the server will be closed as soon as the execution of the + script ends, unless it's closed earlier by explicitly calling ifx_close. + + + + &reftitle.parameters; + + All of the arguments are optional, and if they're missing, defaults are + taken from values supplied in &php.ini; (ifx.default_host for the host + (Informix libraries will use INFORMIXSERVER environment + value if not defined), ifx.default_user for user, ifx.default_password for + the password (none if not defined). + + + + + database + + + The database name, as a string. + + + + + userid + + + The username, as a string. + + + + + password + + + The password, as a string. + + + + + + + + + &reftitle.returnvalues; + + Returns a connection identifier on success, or &false; on error. + + + + + &reftitle.examples; Connect to a Informix database @@ -50,11 +90,18 @@ $conn_id = ifx_connect ("mydb@ol_srv1", "imyself", "mypassword"); + + + + &reftitle.seealso; - See also ifx_pconnect and - ifx_close. + + ifx_pconnect + ifx_close + + + ifx_copy_blob Duplicates the given blob object - - Description + + + &reftitle.description; intifx_copy_blob intbid - Duplicates the given blob object. bid is - the ID of the blob object. + Duplicates the given blob object. + + + + &reftitle.parameters; - Returns &false; on error otherwise the new blob object-id. + + + bid + + + A BLOB identifier. + + + + + + + + + &reftitle.returnvalues; + + Returns the new blob object-id, or &false; on errors. diff --git a/reference/ifx/functions/ifx-create-blob.xml b/reference/ifx/functions/ifx-create-blob.xml index 9a2b1b088d..02c4ec3735 100644 --- a/reference/ifx/functions/ifx-create-blob.xml +++ b/reference/ifx/functions/ifx-create-blob.xml @@ -1,12 +1,13 @@ - + ifx_create_blob Creates an blob object - - Description + + + &reftitle.description; intifx_create_blob inttype @@ -16,21 +17,49 @@ Creates a blob object. + + + + &reftitle.parameters; - type: 1 = TEXT, 0 = BYTE - - - mode: 0 = blob-object holds the content in memory, - 1 = blob-object holds the content in file. - - - param: if mode = 0: pointer to the content, - if mode = 1: pointer to the filestring. - - - Return &false; on error, otherwise the new blob object-id. + + + type + + + 1 = TEXT, 0 = BYTE + + + + + mode + + + 0 = blob-object holds the content in memory, + 1 = blob-object holds the content in file. + + + + + param + + + if mode = 0: pointer to the content, + if mode = 1: pointer to the filestring. + + + + + + + &reftitle.returnvalues; + + Returns the new BLOB object-id, or &false; on errors. + + + + ifx_create_char Creates an char object - - Description + + + &reftitle.description; intifx_create_char stringparam - Creates an char object. param should - be the char content. - - - Return &false; on error, otherwise the new char object id. + Creates an char object. + + + &reftitle.parameters; + + + + param + + + The char content. + + + + + + + + + &reftitle.returnvalues; + + Returns the new char object id, or &false; on errors. + + + + ifx_do Execute a previously prepared SQL-statement - - Description + + + &reftitle.description; boolifx_do resourceresult_id - - &return.success; - Executes a previously prepared query or opens a cursor for it. @@ -23,10 +21,41 @@ Also sets the real number of ifx_affected_rows for non-select statements - for retrieval by ifx_affected_rows + for retrieval by ifx_affected_rows. + + + + &reftitle.parameters; - See also: ifx_prepare. + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + + ifx_prepare + diff --git a/reference/ifx/functions/ifx-error.xml b/reference/ifx/functions/ifx-error.xml index b396ccbf37..79f5a669a7 100644 --- a/reference/ifx/functions/ifx-error.xml +++ b/reference/ifx/functions/ifx-error.xml @@ -1,22 +1,45 @@ - + ifx_error Returns error code of last Informix call - - Description + + + &reftitle.description; stringifx_error - resourceconnection_id + resourcelink_identifier - The Informix error codes (SQLSTATE & SQLCODE) formatted as - follows : + Returns in a string one character describing the general results of a + statement and both SQLSTATE and SQLCODE associated with the most recent + SQL statement executed. + + + + &reftitle.parameters; - x [SQLSTATE = aa bbb SQLCODE=cccc] + + + link_identifier + + + The link identifier. + + + + + + + + + &reftitle.returnvalues; + + The Informix error codes (SQLSTATE & SQLCODE) formatted as + x [SQLSTATE = aa bbb SQLCODE=cccc]. where x = space : no error @@ -41,19 +64,14 @@ See the Informix manual for the description of SQLSTATE and SQLCODE + + + + &reftitle.seealso; - Returns in a string one character describing the general results - of a statement and both SQLSTATE and SQLCODE associated with the - most recent SQL statement executed. The format of the string is - "(char) [SQLSTATE=(two digits) (three digits) SQLCODE=(one - digit)]". The first character can be ' ' - (space) (success), 'W' (the statement caused - some warning), 'E' (an error happened when - executing the statement) or 'N' (the statement - didn't return any data). - - - See also: ifx_errormsg + + ifx_errormsg + diff --git a/reference/ifx/functions/ifx-errormsg.xml b/reference/ifx/functions/ifx-errormsg.xml index 34ea81a9d7..102d125fee 100644 --- a/reference/ifx/functions/ifx-errormsg.xml +++ b/reference/ifx/functions/ifx-errormsg.xml @@ -1,22 +1,49 @@ - + ifx_errormsg Returns error message of last Informix call - - Description + + + &reftitle.description; stringifx_errormsg interrorcode - Returns the Informix error message associated with the most - recent Informix error, or, when the optional - errorcode parameter is present, the error - message corresponding to errorcode. + Returns the Informix error message associated with the most recent + Informix error. + + + + &reftitle.parameters; + + + + errorcode + + + If specified, the function will return the message corresponding to + the specified code. + + + + + + + + + &reftitle.returnvalues; + + Return the error message, as a string. + + + + + &reftitle.examples; <function>ifx_errormsg</function> example @@ -27,8 +54,14 @@ printf("%s\n<br>", ifx_errormsg(-201)); + + + + &reftitle.seealso; - See also ifx_error. + + ifx_error + diff --git a/reference/ifx/functions/ifx-fetch-row.xml b/reference/ifx/functions/ifx-fetch-row.xml index 83dab96938..ffa83ed487 100644 --- a/reference/ifx/functions/ifx-fetch-row.xml +++ b/reference/ifx/functions/ifx-fetch-row.xml @@ -1,50 +1,76 @@ - + ifx_fetch_row Get row as enumerated array - - Description + + + &reftitle.description; arrayifx_fetch_row resourceresult_id mixedposition - Returns an associative array that corresponds to the fetched row, - or &false; if there are no more rows. + Fetches one row of data from the result associated with the specified + result identifier. + + + Subsequent calls to ifx_fetch_row would return the + next row in the result set, or &false; if there are no more rows. + + + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + position + + + An optional parameter for a "fetch" operation on "scroll" cursors: + NEXT, PREVIOUS, + CURRENT, FIRST, + LAST or a number. If you specify a number, an + "absolute" row fetch is executed. This parameter is optional, and + only valid for SCROLL cursors. + + + + + + + + + &reftitle.returnvalues; + + 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 0, with the column name as key. Blob columns are returned as integer blob id values for use in ifx_get_blob unless you have used ifx_textasvarchar(1) or ifx_byteasvarchar(1), in which case blobs - are returned as string values. Returns &false; on error - - - result_id is a valid resultid returned by - ifx_query or - ifx_prepare (select type queries only!). - - - position is an - optional parameter for a "fetch" operation on "scroll" cursors: - "NEXT", "PREVIOUS", "CURRENT", "FIRST", "LAST" or a number. If - you specify a number, an "absolute" row fetch is executed. This - parameter is optional, and only valid for SCROLL cursors. - - - ifx_fetch_row fetches one row of data from - the result associated with the specified result identifier. The - row is returned as an array. Each result column is stored in an - array offset, starting at offset 0, with the column name as key. - - - Subsequent calls to ifx_fetch_row would - return the next row in the result set, or &false; if there are no - more rows. + are returned as string values. + + + + &reftitle.examples; Informix fetch rows @@ -80,6 +106,7 @@ ifx_free_result ($rid); + + ifx_fieldproperties List of SQL fieldproperties - - Description + + + &reftitle.description; arrayifx_fieldproperties resourceresult_id - - Returns an associative array with fieldnames as key and the SQL - fieldproperties as data for a query with - result_id. Returns &false; on error. - Returns the Informix SQL fieldproperties of every field in the query as an associative array. Properties are encoded as: "SQLTYPE;length;precision;scale;ISNULLABLE" where SQLTYPE = the Informix type like "SQLVCHAR" etc. and ISNULLABLE = "Y" or "N". + + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; + + Returns an associative array with fieldnames as key and the SQL + fieldproperties as data for a query with result_id. + Returns &false; on errors. + + + + + &reftitle.examples; Informix SQL fieldproperties @@ -41,6 +68,7 @@ foreach ($properties as $fname => $val) { + + ifx_fieldtypes List of Informix SQL fields - - Description + + + &reftitle.description; arrayifx_fieldtypes resourceresult_id + + Returns an associative array with fieldnames as key and the SQL + fieldtypes as data for the query associated with + result_id. + + + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; Returns an associative array with fieldnames as key and the SQL fieldtypes as data for query with result_id. Returns &false; on error. + + + + &reftitle.examples; Fieldnames and SQL fieldtypes diff --git a/reference/ifx/functions/ifx-free-blob.xml b/reference/ifx/functions/ifx-free-blob.xml index 744c842f56..67f3b1f5d4 100644 --- a/reference/ifx/functions/ifx-free-blob.xml +++ b/reference/ifx/functions/ifx-free-blob.xml @@ -1,20 +1,40 @@ - + ifx_free_blob Deletes the blob object - - Description + + + &reftitle.description; boolifx_free_blob intbid - Deletes the blobobject for the given blob object-id - bid. + Deletes the blobobject for the given blob object-id. + + + + &reftitle.parameters; + + + + bid + + + The BLOB object id. + + + + + + + + + &reftitle.returnvalues; &return.success; diff --git a/reference/ifx/functions/ifx-free-char.xml b/reference/ifx/functions/ifx-free-char.xml index d5a9e8132c..46c7273e6b 100644 --- a/reference/ifx/functions/ifx-free-char.xml +++ b/reference/ifx/functions/ifx-free-char.xml @@ -1,20 +1,40 @@ - + ifx_free_char Deletes the char object - - Description + + + &reftitle.description; boolifx_free_char intbid - Deletes the charobject for the given char object-id - bid. + Deletes the charobject for the given char object-id. + + + + &reftitle.parameters; + + + + bid + + + The char object id. + + + + + + + + + &reftitle.returnvalues; &return.success; diff --git a/reference/ifx/functions/ifx-free-result.xml b/reference/ifx/functions/ifx-free-result.xml index fcfd270e8c..76fa820571 100644 --- a/reference/ifx/functions/ifx-free-result.xml +++ b/reference/ifx/functions/ifx-free-result.xml @@ -1,12 +1,13 @@ - + ifx_free_result Releases resources for the query - - Description + + + &reftitle.description; boolifx_free_result resourceresult_id @@ -15,6 +16,28 @@ Releases resources for the query associated with result_id. + + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; &return.success; diff --git a/reference/ifx/functions/ifx-get-blob.xml b/reference/ifx/functions/ifx-get-blob.xml index c6244a3a4e..834ecc1478 100644 --- a/reference/ifx/functions/ifx-get-blob.xml +++ b/reference/ifx/functions/ifx-get-blob.xml @@ -1,21 +1,45 @@ - + ifx_get_blob Return the content of a blob object - - Description + + + &reftitle.description; stringifx_get_blob intbid - Returns the content of the blob object for the given blob - object-id bid. + Returns the content of the blob object. + + + &reftitle.parameters; + + + + bid + + + The BLOB object id. + + + + + + + + + &reftitle.returnvalues; + + The contents of the BLOB as a string, or &false; on errors. + + + + ifx_get_char Return the content of the char object - - Description + + + &reftitle.description; stringifx_get_char intbid - Returns the content of the char object for the given char - object-id bid. + Returns the content of the char object. + + + + + &reftitle.parameters; + + + + bid + + + The char object-id. + + + + + + + + + &reftitle.returnvalues; + + Returns the contents as a string, or &false; on errors. diff --git a/reference/ifx/functions/ifx-getsqlca.xml b/reference/ifx/functions/ifx-getsqlca.xml index 4d11eb9c0a..dc7b3eb675 100644 --- a/reference/ifx/functions/ifx-getsqlca.xml +++ b/reference/ifx/functions/ifx-getsqlca.xml @@ -1,37 +1,63 @@ - + ifx_getsqlca Get the contents of sqlca.sqlerrd[0..5] after a query - - Description + + + &reftitle.description; arrayifx_getsqlca resourceresult_id - result_id is a valid result id returned by - ifx_query or - ifx_prepare. + Returns a pseudo-row with sqlca.sqlerrd[0] ... sqlca.sqlerrd[5] after the + query associated with result_id. - Returns a pseudo-row (associative array) with sqlca.sqlerrd[0] - ... sqlca.sqlerrd[5] after the query associated with - result_id. + For inserts, updates and deletes the values returned are those as set by + the server after executing the query. This gives access to the number of + affected rows and the serial insert value. For SELECTs + the values are those saved after the PREPARE statement. + This gives access to the *estimated* number of affected rows. The use of + this function saves the overhead of executing a SELECT + dbinfo('sqlca.sqlerrdx') query, as it retrieves the values that + were saved by the ifx driver at the appropriate moment. + + + + &reftitle.parameters; - For inserts, updates and deletes the values returned are those as - set by the server after executing the query. This gives access to - the number of affected rows and the serial insert value. For - SELECTs the values are those saved after the PREPARE - statement. This gives access to the *estimated* number of - affected rows. The use of this function saves the overhead of - executing a "select dbinfo('sqlca.sqlerrdx')" query, as it - retrieves the values that were saved by the ifx driver at the - appropriate moment. + + + result_id + + + result_id is a valid result id returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + &reftitle.returnvalues; + + Returns an associative array with the following entries: + sqlerrd0, sqlerrd1, + sqlerrd2, sqlerrd3, + sqlerrd4 and sqlerrd5. + + + + + &reftitle.examples; Retrieve Informix sqlca.sqlerrd[x] values diff --git a/reference/ifx/functions/ifx-htmltbl-result.xml b/reference/ifx/functions/ifx-htmltbl-result.xml index 52a1cc673f..1adf4443ec 100644 --- a/reference/ifx/functions/ifx-htmltbl-result.xml +++ b/reference/ifx/functions/ifx-htmltbl-result.xml @@ -1,25 +1,59 @@ - + ifx_htmltbl_result Formats all rows of a query into a HTML table - - Description + + + &reftitle.description; intifx_htmltbl_result resourceresult_id stringhtml_table_options - Returns the number of rows fetched or &false; on error. + Formats and prints all rows of the result_id query + into a HTML table. + + + + &reftitle.parameters; - Formats all rows of the result_id query - into a HTML table. The optional second argument is a string of - <table> tag options + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + html_table_options + + + This optional argument is a string of <table> tag options. + + + + + + + + &reftitle.returnvalues; + + Returns the number of fetched rows, or &false; on errors. + + + + + &reftitle.examples; Informix results as HTML table diff --git a/reference/ifx/functions/ifx-nullformat.xml b/reference/ifx/functions/ifx-nullformat.xml index df8d349199..bf10672421 100644 --- a/reference/ifx/functions/ifx-nullformat.xml +++ b/reference/ifx/functions/ifx-nullformat.xml @@ -1,24 +1,45 @@ - + ifx_nullformat Sets the default return value on a fetch row - - Description + + + &reftitle.description; boolifx_nullformat intmode Sets the default return value of a NULL-value on a fetch row. - Mode "0" returns "", and mode "1" returns "&null;". + + + + &reftitle.parameters; + + + + mode + + + Mode "0" returns "", and mode "1" returns "&null;". + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifx_num_fields Returns the number of columns in the query - - Description + + + &reftitle.description; intifx_num_fields resourceresult_id - - Returns the number of columns in query for - result_id or &false; on error - After preparing or executing a query, this call gives you the number of columns in the query. + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; + + Returns the number of columns in query for + result_id, or &false; on errors. + + + ifx_num_rows Count the rows already fetched from a query - - Description + + + &reftitle.description; intifx_num_rows resourceresult_id @@ -18,6 +19,31 @@ query. + + + &reftitle.parameters; + + + + result_id + + + result_id is a valid resultid returned by + ifx_query or + ifx_prepare (select type queries only!). + + + + + + + + + &reftitle.returnvalues; + + Returns the number of fetched rows or &false; on errors. + + + ifx_pconnect Open persistent Informix connection - - Description + + + &reftitle.description; resourceifx_pconnect stringdatabase stringuserid stringpassword - - Returns: valid Informix persistent link identifier on success, - or &false; on error. - ifx_pconnect acts very much like ifx_connect with two major differences. @@ -36,8 +33,61 @@ This type of links is therefore called 'persistent'. + + + + &reftitle.parameters; - See also: ifx_connect. + All of the arguments are optional, and if they're missing, defaults are + taken from values supplied in &php.ini; (ifx.default_host for the host + (Informix libraries will use INFORMIXSERVER environment + value if not defined), ifx.default_user for user, ifx.default_password for + the password (none if not defined). + + + + + database + + + The database name, as a string. + + + + + userid + + + The username, as a string. + + + + + password + + + The password, as a string. + + + + + + + + + &reftitle.returnvalues; + + Returns: valid Informix persistent link identifier on success, or &false; + on errors. + + + + + &reftitle.seealso; + + + ifx_connect + diff --git a/reference/ifx/functions/ifx-prepare.xml b/reference/ifx/functions/ifx-prepare.xml index 19ef7c405f..832d5c8da1 100644 --- a/reference/ifx/functions/ifx-prepare.xml +++ b/reference/ifx/functions/ifx-prepare.xml @@ -1,58 +1,108 @@ - + ifx_prepare Prepare an SQL-statement for execution - - Description + + + &reftitle.description; resourceifx_prepare stringquery - resourceconn_id + resourcelink_identifier intcursor_def mixedblobidarray - Returns valid result_id for use by - ifx_do. Sets - affected_rows for retrieval by the - ifx_affected_rows function. + Prepares a query for later use with + ifx_do. - Prepares query on connection - conn_id. For "select-type" queries a - cursor is declared and opened. The optional - cursor_type parameter allows you to make - this a "scroll" and/or "hold" cursor. It's a bitmask and can be - either IFX_SCROLL, IFX_HOLD, or both or'ed together. + For "select-type" queries a cursor is declared and opened. + Non-select queries are "execute immediate". - For either query type the estimated number of affected rows is + For either query type the number of (estimated or real) affected rows is saved for retrieval by ifx_affected_rows. - If you have BLOB (BYTE or TEXT) columns in the query, you can add - a blobidarray parameter containing the - corresponding "blob ids", and you should replace those columns - with a "?" in the query text. + If the contents of the TEXT (or BYTE) column allow it, you can also use + ifx_textasvarchar(1) and + ifx_byteasvarchar(1). This allows you to treat TEXT + (or BYTE) columns just as if they were ordinary (but long) VARCHAR columns + for select queries, and you don't need to bother with blob id's. - If the contents of the TEXT (or BYTE) column allow it, you can - also use "ifx_textasvarchar(1)" and "ifx_byteasvarchar(1)". This - allows you to treat TEXT (or BYTE) columns just as if they were - ordinary (but long) VARCHAR columns for select queries, and you - don't need to bother with blob id's. + With ifx_textasvarchar(0) or + ifx_byteasvarchar(0) (the default situation), select + queries will return BLOB columns as blob id's (integer value). You can + get the value of the blob as a string or file with the blob functions (see + below). + + + + &reftitle.parameters; - With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default - situation), select queries will return BLOB columns as blob id's - (integer value). You can get the value of the blob as a string - or file with the blob functions (see below). + + + query + + + The query string. + + + + + link_identifier + + + The link identifier. + + + + + cursor_def + + + This optional parameter allows you to make this a + scroll and/or hold cursor. + It's a bitmask and can be either IFX_SCROLL, + IFX_HOLD, or both or'ed together. + + + + + blobidarray + + + If you have BLOB (BYTE or TEXT) columns in the query, you can add + a blobidarray parameter containing the + corresponding "blob ids", and you should replace those columns + with a "?" in the query text. + + + + + + + + &reftitle.returnvalues; - See also: ifx_do. + Returns a valid result identifier for use by ifx_do, + or &false; on errors. + + + + + &reftitle.seealso; + + + ifx_do + diff --git a/reference/ifx/functions/ifx-query.xml b/reference/ifx/functions/ifx-query.xml index 1f9220db26..e09e5a10cc 100644 --- a/reference/ifx/functions/ifx-query.xml +++ b/reference/ifx/functions/ifx-query.xml @@ -1,12 +1,13 @@ - + ifx_query Send Informix query - - Description + + + &reftitle.description; resourceifx_query stringquery @@ -15,56 +16,89 @@ mixedblobidarray - Returns valid Informix result identifier on success, or - &false; on error. + Sends a query to the currently active database on + the server that's associated with the specified link identifier. - A "result_id" resource used by other functions to retrieve the - query results. Sets "affected_rows" for retrieval by the - ifx_affected_rows function. + For "select-type" queries a cursor is declared and opened. + Non-select queries are "execute immediate". - ifx_query sends a query to the currently - active database on the server that's associated with the - specified link identifier. + For either query type the number of (estimated or real) affected rows is + saved for retrieval by ifx_affected_rows. - Executes query on connection - conn_id. For "select-type" queries a - cursor is declared and opened. The optional - cursor_type parameter allows you to make - this a "scroll" and/or "hold" cursor. It's a bitmask and can be - either IFX_SCROLL, IFX_HOLD, or both or'ed together. Non-select - queries are "execute immediate". IFX_SCROLL and IFX_HOLD are - symbolic constants and as such shouldn't be between quotes. I you - omit this parameter the cursor is a normal sequential cursor. + If the contents of the TEXT (or BYTE) column allow it, you can also use + ifx_textasvarchar(1) and + ifx_byteasvarchar(1). This allows you to treat TEXT + (or BYTE) columns just as if they were ordinary (but long) VARCHAR columns + for select queries, and you don't need to bother with blob id's. - For either query type the number of (estimated or real) affected - rows is saved for retrieval by - ifx_affected_rows. + With ifx_textasvarchar(0) or + ifx_byteasvarchar(0) (the default situation), select + queries will return BLOB columns as blob id's (integer value). You can + get the value of the blob as a string or file with the blob functions (see + below). + + + + &reftitle.parameters; - If you have BLOB (BYTE or TEXT) columns in an update query, you - can add a blobidarray parameter containing - the corresponding "blob ids", and you should replace those - columns with a "?" in the query text. + + + query + + + The query string. + + + + + link_identifier + + + The link identifier. + + + + + cursor_def + + + This optional parameter allows you to make this a + scroll and/or hold cursor. + It's a bitmask and can be either IFX_SCROLL, + IFX_HOLD, or both or'ed together. I you omit this + parameter the cursor is a normal sequential cursor. + + + + + blobidarray + + + If you have BLOB (BYTE or TEXT) columns in the query, you can add + a blobidarray parameter containing the + corresponding "blob ids", and you should replace those columns + with a "?" in the query text. + + + + + + + + &reftitle.returnvalues; - If the contents of the TEXT (or BYTE) column allow it, you can - also use "ifx_textasvarchar(1)" and "ifx_byteasvarchar(1)". This - allows you to treat TEXT (or BYTE) columns just as if they were - ordinary (but long) VARCHAR columns for select queries, and you - don't need to bother with blob id's. - - With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default - situation), select queries will return BLOB columns as blob id's - (integer value). You can get the value of the blob as a string - or file with the blob functions (see below). + Returns valid Informix result identifier on success, or &false; on errors. + + + + &reftitle.examples; @@ -115,10 +149,17 @@ ifx_free_result($res_id); </programlisting> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>ifx_connect</function>. + <simplelist> + <member><function>ifx_connect</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/ifx/functions/ifx-textasvarchar.xml b/reference/ifx/functions/ifx-textasvarchar.xml index 166d547f81..d6e660939f 100644 --- a/reference/ifx/functions/ifx-textasvarchar.xml +++ b/reference/ifx/functions/ifx-textasvarchar.xml @@ -1,25 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.ifx-textasvarchar"> <refnamediv> <refname>ifx_textasvarchar</refname> <refpurpose>Set the default text mode</refpurpose> </refnamediv> - <refsect1> - <title>Description + + + &reftitle.description; boolifx_textasvarchar intmode - Sets the default text mode for all select-queries. Mode "0" will - return a blob id, and mode "1" will return a varchar with text - content. + Sets the default text mode for all select-queries. + + + + &reftitle.parameters; + + + + mode + + + Mode "0" will return a blob id, and mode "1" will return a varchar + with text content. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifx_update_blob Updates the content of the blob object - - Description + + + &reftitle.description; boolifx_update_blob intbid @@ -14,13 +15,41 @@ Updates the content of the blob object for the given blob object - bid. content is a - string with new data. + bid. + + + + &reftitle.parameters; + + + + bid + + + A BLOB object identifier. + + + + + content + + + The new data, as a string. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifx_update_char Updates the content of the char object - - Description + + + &reftitle.description; boolifx_update_char intbid @@ -14,13 +15,41 @@ Updates the content of the char object for the given char object - bid. content is a - string with new data. + bid. + + + + &reftitle.parameters; + + + + bid + + + A char object identifier. + + + + + content + + + The new data, as a string. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifxus_close_slob Deletes the slob object - - Description + + + &reftitle.description; boolifxus_close_slob intbid @@ -15,10 +16,31 @@ Deletes the slob object on the given slob object-id bid. + + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifxus_create_slob Creates an slob object and opens it - - Description + + + &reftitle.description; intifxus_create_slob intmode - Creates an slob object and opens it. Modes: 1 = LO_RDONLY, 2 = - LO_WRONLY, 4 = LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = - LO_NOBUFFER -> or-mask. You can also use constants named - IFX_LO_RDONLY, IFX_LO_WRONLY etc. Return &false; on error otherwise - the new slob object-id. + Creates an slob object and opens it. + + + &reftitle.parameters; + + + + mode + + + A combination of IFX_LO_RDONLY, + IFX_LO_WRONLY, IFX_LO_APPEND + IFX_LO_RDWR, IFX_LO_BUFFER, + IFX_LO_NOBUFFER. + + + + + + + + + &reftitle.returnvalues; + + Return the new slob object-id, or &false; on errors. + + + + ifxus_free_slob Deletes the slob object - - Description + + + &reftitle.description; boolifxus_free_slob intbid - Deletes the slob object. bid is the Id of - the slob object. + Deletes the slob object. + + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + + + + + &reftitle.returnvalues; &return.success; + + ifxus_open_slob Opens an slob object - - Description + + + &reftitle.description; intifxus_open_slob intbid @@ -14,12 +15,44 @@ Opens an slob object. bid should be an - existing slob id. Modes: 1 = LO_RDONLY, 2 = LO_WRONLY, 4 = - LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = LO_NOBUFFER -> - or-mask. Returns &false; on error otherwise the new slob - object-id. + existing slob id. + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + mode + + + A combination of IFX_LO_RDONLY, + IFX_LO_WRONLY, IFX_LO_APPEND + IFX_LO_RDWR, IFX_LO_BUFFER, + IFX_LO_NOBUFFER. + + + + + + + + + &reftitle.returnvalues; + + Returns the new slob object-id, or &false; on errors. + + + + ifxus_read_slob Reads nbytes of the slob object - - Description + + + &reftitle.description; stringifxus_read_slob intbid intnbytes - Reads nbytes of the slob object. bid is an - existing slob id and nbytes is the number - of bytes to read. Return &false; on error otherwise the string. + Reads nbytes of the slob object. + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + nbytes + + + The number of bytes to read. + + + + + + + + + &reftitle.returnvalues; + + Returns the slob contents as a string, or &false; on errors. + + + + ifxus_seek_slob Sets the current file or seek position - - Description + + + &reftitle.description; intifxus_seek_slob intbid @@ -15,12 +16,48 @@ Sets the current file or seek position of an open slob object. - bid should be an existing slob id. Modes: - 0 = LO_SEEK_SET, 1 = LO_SEEK_CUR, 2 = LO_SEEK_END and - offset is an byte offset. Return &false; on - error otherwise the seek position. + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + mode + + + 0 = LO_SEEK_SET, 1 = LO_SEEK_CUR, 2 = LO_SEEK_END. + + + + + offset + + + A byte offset. + + + + + + + + + &reftitle.returnvalues; + + Returns the seek position as an integer, or &false; on errors. + + + + ifxus_tell_slob Returns the current file or seek position - - Description + + + &reftitle.description; intifxus_tell_slob intbid Returns the current file or seek position of an open slob object - bid should be an existing slob id. Return - &false; on error otherwise the seek position. + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + + + + + &reftitle.returnvalues; + + Returns the seek position as an integer, or &false; on errors. + + + + ifxus_write_slob Writes a string into the slob object - - Description + + + &reftitle.description; intifxus_write_slob intbid stringcontent - Writes a string into the slob object. bid - is an existing slob id and content the - content to write. Return &false; on error otherwise bytes written. + Writes a string into the slob object. + + + &reftitle.parameters; + + + + bid + + + An existing slob id. + + + + + content + + + The content to write, as a string. + + + + + + + + + &reftitle.returnvalues; + + Returns the bytes written as an integer, or &false; on errors. + + +