From dedf88320608cc6f084b3782782a1a6e0ead73ea Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sun, 21 Jan 2007 15:43:04 +0000 Subject: [PATCH] WS, prepare to new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227756 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../fbsql/functions/fbsql-affected-rows.xml | 101 +++++----- .../fbsql/functions/fbsql-autocommit.xml | 59 +++--- reference/fbsql/functions/fbsql-blob-size.xml | 34 ++-- .../fbsql/functions/fbsql-change-user.xml | 57 +++--- reference/fbsql/functions/fbsql-clob-size.xml | 34 ++-- reference/fbsql/functions/fbsql-close.xml | 77 ++++---- reference/fbsql/functions/fbsql-commit.xml | 57 +++--- reference/fbsql/functions/fbsql-connect.xml | 97 +++++----- .../fbsql/functions/fbsql-create-blob.xml | 93 +++++---- .../fbsql/functions/fbsql-create-clob.xml | 93 +++++---- reference/fbsql/functions/fbsql-create-db.xml | 61 +++--- reference/fbsql/functions/fbsql-data-seek.xml | 105 +++++------ .../functions/fbsql-database-password.xml | 99 +++++----- reference/fbsql/functions/fbsql-database.xml | 37 ++-- reference/fbsql/functions/fbsql-db-query.xml | 65 +++---- reference/fbsql/functions/fbsql-db-status.xml | 153 ++++++++------- reference/fbsql/functions/fbsql-drop-db.xml | 49 +++-- reference/fbsql/functions/fbsql-errno.xml | 76 ++++---- reference/fbsql/functions/fbsql-error.xml | 76 ++++---- .../fbsql/functions/fbsql-fetch-array.xml | 122 ++++++------ .../fbsql/functions/fbsql-fetch-assoc.xml | 99 +++++----- .../fbsql/functions/fbsql-fetch-field.xml | 131 +++++++------ .../fbsql/functions/fbsql-fetch-lengths.xml | 63 +++---- .../fbsql/functions/fbsql-fetch-object.xml | 97 +++++----- reference/fbsql/functions/fbsql-fetch-row.xml | 73 ++++---- .../fbsql/functions/fbsql-field-flags.xml | 45 +++-- reference/fbsql/functions/fbsql-field-len.xml | 41 ++-- .../fbsql/functions/fbsql-field-name.xml | 85 ++++----- .../fbsql/functions/fbsql-field-seek.xml | 51 +++-- .../fbsql/functions/fbsql-field-table.xml | 41 ++-- .../fbsql/functions/fbsql-field-type.xml | 63 +++---- .../fbsql/functions/fbsql-free-result.xml | 49 +++-- .../functions/fbsql-get-autostart-info.xml | 35 ++-- reference/fbsql/functions/fbsql-hostname.xml | 35 ++-- reference/fbsql/functions/fbsql-insert-id.xml | 75 ++++---- reference/fbsql/functions/fbsql-list-dbs.xml | 77 ++++---- .../fbsql/functions/fbsql-list-fields.xml | 87 +++++---- .../fbsql/functions/fbsql-list-tables.xml | 47 +++-- .../fbsql/functions/fbsql-next-result.xml | 81 ++++---- .../fbsql/functions/fbsql-num-fields.xml | 51 +++-- reference/fbsql/functions/fbsql-num-rows.xml | 69 ++++--- reference/fbsql/functions/fbsql-password.xml | 35 ++-- reference/fbsql/functions/fbsql-pconnect.xml | 101 +++++----- reference/fbsql/functions/fbsql-query.xml | 177 +++++++++--------- reference/fbsql/functions/fbsql-read-blob.xml | 109 ++++++----- reference/fbsql/functions/fbsql-read-clob.xml | 109 ++++++----- reference/fbsql/functions/fbsql-result.xml | 87 +++++---- reference/fbsql/functions/fbsql-rollback.xml | 55 +++--- reference/fbsql/functions/fbsql-select-db.xml | 101 +++++----- .../fbsql/functions/fbsql-set-lob-mode.xml | 113 ++++++----- .../fbsql/functions/fbsql-set-password.xml | 38 ++-- .../fbsql/functions/fbsql-set-transaction.xml | 39 ++-- reference/fbsql/functions/fbsql-start-db.xml | 53 +++--- reference/fbsql/functions/fbsql-stop-db.xml | 53 +++--- reference/fbsql/functions/fbsql-tablename.xml | 57 +++--- reference/fbsql/functions/fbsql-username.xml | 35 ++-- reference/fbsql/functions/fbsql-warnings.xml | 45 +++-- 57 files changed, 1992 insertions(+), 2155 deletions(-) diff --git a/reference/fbsql/functions/fbsql-affected-rows.xml b/reference/fbsql/functions/fbsql-affected-rows.xml index 9747ff3428..be979ea2ed 100644 --- a/reference/fbsql/functions/fbsql-affected-rows.xml +++ b/reference/fbsql/functions/fbsql-affected-rows.xml @@ -1,57 +1,52 @@ - - - - - fbsql_affected_rows - - Get number of affected rows in previous FrontBase operation - - - - &reftitle.description; - - intfbsql_affected_rows - resource - link_identifier - - - - fbsql_affected_rows returns the number - of rows affected by the last INSERT, UPDATE or DELETE query - associated with link_identifier. If the - link identifier isn't specified, the last link opened by - fbsql_connect is assumed. - - - - If you are using transactions, you need to call - fbsql_affected_rows after your INSERT, - UPDATE, or DELETE query, not after the commit. - - - - If the last query was a DELETE query with no WHERE clause, all of - the records will have been deleted from the table but this - function will return zero. - - - - When using UPDATE, FrontBase will not update columns where the - new value is the same as the old value. This creates the - possibility that fbsql_affected_rows may not - actually equal the number of rows matched, only the number of - rows that were literally affected by the query. - - - - If the last query failed, this function will return -1. - - - See also: fbsql_num_rows. - - - + + + + fbsql_affected_rows + Get number of affected rows in previous FrontBase operation + + + &reftitle.description; + + intfbsql_affected_rows + resourcelink_identifier + + + fbsql_affected_rows returns the number + of rows affected by the last INSERT, UPDATE or DELETE query + associated with link_identifier. If the + link identifier isn't specified, the last link opened by + fbsql_connect is assumed. + + + + If you are using transactions, you need to call + fbsql_affected_rows after your INSERT, + UPDATE, or DELETE query, not after the commit. + + + + If the last query was a DELETE query with no WHERE clause, all of + the records will have been deleted from the table but this + function will return zero. + + + + When using UPDATE, FrontBase will not update columns where the + new value is the same as the old value. This creates the + possibility that fbsql_affected_rows may not + actually equal the number of rows matched, only the number of + rows that were literally affected by the query. + + + + If the last query failed, this function will return -1. + + + See also: fbsql_num_rows. + + + - - - - fbsql_autocommit - Enable or disable autocommit - - - &reftitle.description; - - boolfbsql_autocommit - resourcelink_identifier - boolOnOff - - - fbsql_autocommit returns the current - autocommit status. If the optional OnOff parameter is - given the auto commit status will be changed. - With OnOff set to &true; each statement will be committed - automatically, if no errors was found. - With OnOff set to &false; the user must commit or rollback - the transaction using either fbsql_commit or - fbsql_rollback. - - - See also: fbsql_commit and - fbsql_rollback - - - + + + + fbsql_autocommit + Enable or disable autocommit + + + &reftitle.description; + + boolfbsql_autocommit + resourcelink_identifier + boolOnOff + + + fbsql_autocommit returns the current + autocommit status. If the optional OnOff parameter is + given the auto commit status will be changed. + With OnOff set to &true; each statement will be committed + automatically, if no errors was found. + With OnOff set to &false; the user must commit or rollback + the transaction using either fbsql_commit or + fbsql_rollback. + + + See also: fbsql_commit and + fbsql_rollback + + + - - - fbsql_blob_size - - Get the size of a BLOB - - - - &reftitle.description; - - intfbsql_blob_size - stringblob_handle - resourcelink_identifier - + + + + fbsql_blob_size + Get the size of a BLOB + + + &reftitle.description; + + intfbsql_blob_size + stringblob_handle + resourcelink_identifier + - &warn.undocumented.func; + &warn.undocumented.func; - - + + - - - - fbsql_change_user - - Change logged in user of the active connection - - - - &reftitle.description; - - resourcefbsql_change_user - stringuser - stringpassword - string - database - - resource - link_identifier - - - - fbsql_change_user changes the logged in user - of the current active connection, or the connection given by the - optional parameter link_identifier. If a database is specified, - this will default or current database after the user has been - changed. If the new user and password authorization fails, the - current connected user stays active. - - - + + + + fbsql_change_user + Change logged in user of the active connection + + + &reftitle.description; + + resourcefbsql_change_user + stringuser + stringpassword + stringdatabase + resourcelink_identifier + + + fbsql_change_user changes the logged in user + of the current active connection, or the connection given by the + optional parameter link_identifier. If a database is specified, + this will default or current database after the user has been + changed. If the new user and password authorization fails, the + current connected user stays active. + + + - - - fbsql_clob_size - - Get the size of a CLOB - - - - &reftitle.description; - - intfbsql_clob_size - stringclob_handle - resourcelink_identifier - + + + + fbsql_clob_size + Get the size of a CLOB + + + &reftitle.description; + + intfbsql_clob_size + stringclob_handle + resourcelink_identifier + - &warn.undocumented.func; + &warn.undocumented.func; - - + + - - - - fbsql_close - Close FrontBase connection - - - &reftitle.description; - - boolfbsql_close - resource - link_identifier - - - - Returns: &true; on success, &false; on error. - - - fbsql_close closes the connection to the - FrontBase server that's associated with the specified link - identifier. If link_identifier isn't - specified, the last opened link is used. - - - Using fbsql_close isn't usually necessary, - as non-persistent open links are automatically closed at the end - of the script's execution. - - - <function>fbsql_close</function> example - + + + + fbsql_close + Close FrontBase connection + + + &reftitle.description; + + boolfbsql_close + resourcelink_identifier + + + Returns: &true; on success, &false; on error. + + + fbsql_close closes the connection to the + FrontBase server that's associated with the specified link + identifier. If link_identifier isn't + specified, the last opened link is used. + + + Using fbsql_close isn't usually necessary, + as non-persistent open links are automatically closed at the end + of the script's execution. + + + <function>fbsql_close</function> example + ]]> - - - - See also: fbsql_connect and - fbsql_pconnect. - - - + + + + See also: fbsql_connect and + fbsql_pconnect. + + + - - - - fbsql_commit - Commits a transaction to the database - - - &reftitle.description; - - boolfbsql_commit - resource - link_identifier - - - - &return.success; - - - fbsql_commit ends the current transaction by - writing all inserts, updates and deletes to the disk and - unlocking all row and table locks held by the transaction. This - command is only needed if autocommit is set to false. - - See also: - fbsql_autocommit and - fbsql_rollback - - - + + + + fbsql_commit + Commits a transaction to the database + + + &reftitle.description; + + boolfbsql_commit + resourcelink_identifier + + + &return.success; + + + fbsql_commit ends the current transaction by + writing all inserts, updates and deletes to the disk and + unlocking all row and table locks held by the transaction. This + command is only needed if autocommit is set to false. + + See also: + fbsql_autocommit and + fbsql_rollback + + + - - - - fbsql_connect - Open a connection to a FrontBase Server - - - &reftitle.description; - - resourcefbsql_connect - stringhostname - stringusername - stringpassword - - - Returns a positive FrontBase link identifier on success, or an - error message on failure. - - - fbsql_connect establishes a connection to a - FrontBase server. The following defaults are assumed for missing - optional parameters: hostname = '&null;', - username = '_SYSTEM' and - password = empty password. - - - If a second call is made to fbsql_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 - fbsql_close. - - - <function>fbsql_connect</function> example - + + + + fbsql_connect + Open a connection to a FrontBase Server + + + &reftitle.description; + + resourcefbsql_connect + stringhostname + stringusername + stringpassword + + + Returns a positive FrontBase link identifier on success, or an + error message on failure. + + + fbsql_connect establishes a connection to a + FrontBase server. The following defaults are assumed for missing + optional parameters: hostname = '&null;', + username = '_SYSTEM' and + password = empty password. + + + If a second call is made to fbsql_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 + fbsql_close. + + + <function>fbsql_connect</function> example + ]]> - - - - See also - fbsql_pconnect and - fbsql_close. - - - + + + + See also + fbsql_pconnect and + fbsql_close. + + + - - - - fbsql_create_blob - Create a BLOB - - - &reftitle.description; - - stringfbsql_create_blob - stringblob_data - resource - link_identifier - - - - Returns: A resource handle to the newly created blob. - - - fbsql_create_blob creates a blob from - blob_data. The returned resource handle can be used with insert - and update commands to store the blob in the database. - - - <function>fbsql_create_blob</function> example - + + + + fbsql_create_blob + Create a BLOB + + + &reftitle.description; + + stringfbsql_create_blob + stringblob_data + resourcelink_identifier + + + Returns: A resource handle to the newly created blob. + + + fbsql_create_blob creates a blob from + blob_data. The returned resource handle can be used with insert + and update commands to store the blob in the database. + + + <function>fbsql_create_blob</function> example + ]]> - - - - See also: fbsql_create_clob, - fbsql_read_blob, - fbsql_read_clob, and - fbsql_set_lob_mode. - - - + + + + See also: fbsql_create_clob, + fbsql_read_blob, + fbsql_read_clob, and + fbsql_set_lob_mode. + + + - - - - fbsql_create_clob - Create a CLOB - - - &reftitle.description; - - stringfbsql_create_clob - stringclob_data - resource - link_identifier - - - - Returns: A resource handle to the newly created CLOB. - - - fbsql_create_clob creates a clob from - clob_data. The returned resource handle can be used with insert - and update commands to store the clob in the database. - - - <function>fbsql_create_clob</function> example - + + + + fbsql_create_clob + Create a CLOB + + + &reftitle.description; + + stringfbsql_create_clob + stringclob_data + resourcelink_identifier + + + Returns: A resource handle to the newly created CLOB. + + + fbsql_create_clob creates a clob from + clob_data. The returned resource handle can be used with insert + and update commands to store the clob in the database. + + + <function>fbsql_create_clob</function> example + ]]> - - - - See also: fbsql_create_blob, - fbsql_read_blob, - fbsql_read_clob, and - fbsql_set_lob_mode. - - - + + + + See also: fbsql_create_blob, + fbsql_read_blob, + fbsql_read_clob, and + fbsql_set_lob_mode. + + + - - - - fbsql_create_db - Create a FrontBase database - - - &reftitle.description; - - boolfbsql_create_db - stringdatabase_name - resourcelink_identifier - stringdatabase_options - - - fbsql_create_db attempts to create a new - database named database_name on the server - associated with the specified connection - link_identifier. - - - <function>fbsql_create_db</function> example - + + + + fbsql_create_db + Create a FrontBase database + + + &reftitle.description; + + boolfbsql_create_db + stringdatabase_name + resourcelink_identifier + stringdatabase_options + + + fbsql_create_db attempts to create a new + database named database_name on the server + associated with the specified connection + link_identifier. + + + <function>fbsql_create_db</function> example + ]]> - - - - See also: fbsql_drop_db. - - - + + + + See also: fbsql_drop_db. + + + - - - - fbsql_data_seek - Move internal result pointer - - - &reftitle.description; - - boolfbsql_data_seek - resourceresult_identifier - introw_number - - - &return.success; - - - fbsql_data_seek moves the internal row - pointer of the FrontBase result associated with the specified - result identifier to point to the specified row number. The next - call to fbsql_fetch_row would return that - row. - - - Row_number starts at 0. - - - <function>fbsql_data_seek</function> example - + + + + fbsql_data_seek + Move internal result pointer + + + &reftitle.description; + + boolfbsql_data_seek + resourceresult_identifier + introw_number + + + &return.success; + + + fbsql_data_seek moves the internal row + pointer of the FrontBase result associated with the specified + result identifier to point to the specified row number. The next + call to fbsql_fetch_row would return that + row. + + + Row_number starts at 0. + + + <function>fbsql_data_seek</function> example + =0; $i--) { - if (!fbsql_data_seek($result, $i)) { - printf("Cannot seek to row %d\n", $i); - continue; - } - - if (!($row = fbsql_fetch_object($result))) - continue; - - echo $row->last_name . $row->first_name . "
\n"; +for ($i = fbsql_num_rows($result) - 1; $i >=0; $i--) { + if (!fbsql_data_seek($result, $i)) { + printf("Cannot seek to row %d\n", $i); + continue; } - fbsql_free_result($result); + if (!($row = fbsql_fetch_object($result))) + continue; + + echo $row->last_name . $row->first_name . "
\n"; +} + +fbsql_free_result($result); ?> ]]> -
-
-
-
+
+
+
+
- - - - fbsql_database_password - - Sets or retrieves the password for a FrontBase database - - - - &reftitle.description; - - stringfbsql_database_password - resourcelink_identifier - string - database_password - - - - Returns: The database password associated with the link identifier. - - - fbsql_database_password sets and retrieves - the database password used by the connection. if a database is - protected by a database password, the user must call this function - before calling fbsql_select_db. if the second - optional parameter is given the function sets the database - password for the specified link identifier. If no link identifier is - specified, the last opened link is assumed. If no link is open, - the function will try to establish a link as if - fbsql_connect was called, and use it. - - - This function does not change the database password in the database - nor can it be used to retrieve the database password for a database. - - - <function>fbsql_create_clob</function> example - + + + + fbsql_database_password + Sets or retrieves the password for a FrontBase database + + + &reftitle.description; + + stringfbsql_database_password + resourcelink_identifier + stringdatabase_password + + + Returns: The database password associated with the link identifier. + + + fbsql_database_password sets and retrieves + the database password used by the connection. if a database is + protected by a database password, the user must call this function + before calling fbsql_select_db. if the second + optional parameter is given the function sets the database + password for the specified link identifier. If no link identifier is + specified, the last opened link is assumed. If no link is open, + the function will try to establish a link as if + fbsql_connect was called, and use it. + + + This function does not change the database password in the database + nor can it be used to retrieve the database password for a database. + + + <function>fbsql_create_clob</function> example + ]]> - - - - See also: fbsql_connect, - fbsql_pconnect and - fbsql_select_db. - - - + + + + See also: fbsql_connect, + fbsql_pconnect and + fbsql_select_db. + + + - - - - fbsql_database - Get or set the database name used with a connection - - - &reftitle.description; - - stringfbsql_database - resourcelink_identifier - stringdatabase - - - &warn.undocumented.func; - - - + + + + fbsql_database + Get or set the database name used with a connection + + + &reftitle.description; + + stringfbsql_database + resourcelink_identifier + stringdatabase + + + &warn.undocumented.func; + + + - - - - fbsql_db_query - Send a FrontBase query - - - &reftitle.description; - - resourcefbsql_db_query - stringdatabase - stringquery - resource - link_identifier - - - - Returns: A positive FrontBase result identifier to the query - result, or &false; on error. - - - fbsql_db_query selects a database and - executes a query on it. If the optional link identifier isn't - specified, the function will try to find an open link to the - FrontBase server and if no such link is found it'll try to create - one as if fbsql_connect was called with no - arguments - - - See also fbsql_connect. - - - + + + + fbsql_db_query + Send a FrontBase query + + + &reftitle.description; + + resourcefbsql_db_query + stringdatabase + stringquery + resourcelink_identifier + + + Returns: A positive FrontBase result identifier to the query + result, or &false; on error. + + + fbsql_db_query selects a database and + executes a query on it. If the optional link identifier isn't + specified, the function will try to find an open link to the + FrontBase server and if no such link is found it'll try to create + one as if fbsql_connect was called with no + arguments + + + See also fbsql_connect. + + + - - - - fbsql_db_status - Get the status for a given database - - - &reftitle.description; - - intfbsql_db_status - stringdatabase_name - resource - link_identifier - - - - Returns: An integer value with the current status. - - - fbsql_db_status requests the current status - of the database specified by - database_name. If the - link_identifier is omitted the default - link_identifier will be used. - - - The return value can be one of the following constants: - - - - &false; - The exec handler for the host was invalid. This - error will occur when the link_identifier connects directly to - a database by using a port number. FBExec can be available on - the server but no connection has been made for it. - - - - - FBSQL_UNKNOWN - The Status is unknown. - - - - - FBSQL_STOPPED - The database is not running. Use - fbsql_start_db to start the database. - - - - - FBSQL_STARTING - The database is starting. - - - - - FBSQL_RUNNING - The database is running and can be used to - perform SQL operations. - - - - - FBSQL_STOPPING - The database is stopping. - - - - - FBSQL_NOEXEC - FBExec is not running on the server and it is not - possible to get the status of the database. - - - - - - See also: fbsql_start_db and - fbsql_stop_db. - - - + + + + fbsql_db_status + Get the status for a given database + + + &reftitle.description; + + intfbsql_db_status + stringdatabase_name + resourcelink_identifier + + + Returns: An integer value with the current status. + + + fbsql_db_status requests the current status + of the database specified by + database_name. If the + link_identifier is omitted the default + link_identifier will be used. + + + The return value can be one of the following constants: + + + + &false; - The exec handler for the host was invalid. This + error will occur when the link_identifier connects directly to + a database by using a port number. FBExec can be available on + the server but no connection has been made for it. + + + + + FBSQL_UNKNOWN - The Status is unknown. + + + + + FBSQL_STOPPED - The database is not running. Use + fbsql_start_db to start the database. + + + + + FBSQL_STARTING - The database is starting. + + + + + FBSQL_RUNNING - The database is running and can be used to + perform SQL operations. + + + + + FBSQL_STOPPING - The database is stopping. + + + + + FBSQL_NOEXEC - FBExec is not running on the server and it is not + possible to get the status of the database. + + + + + + See also: fbsql_start_db and + fbsql_stop_db. + + + - - - - fbsql_drop_db - Drop (delete) a FrontBase database - - - &reftitle.description; - - boolfbsql_drop_db - stringdatabase_name - resource - link_identifier - - - - &return.success; - - - fbsql_drop_db attempts to drop (remove) an - entire database from the server associated with the specified - link identifier. - - - + + + + fbsql_drop_db + Drop (delete) a FrontBase database + + + &reftitle.description; + + boolfbsql_drop_db + stringdatabase_name + resourcelink_identifier + + + &return.success; + + + fbsql_drop_db attempts to drop (remove) an + entire database from the server associated with the specified + link identifier. + + + - - - - fbsql_errno - - Returns the numerical value of the error message from previous - FrontBase operation - - - - &reftitle.description; - - intfbsql_errno - resource - link_identifier - - - - Returns the error number from the last fbsql function, or - 0 (zero) if no error occurred. - - - Errors coming back from the fbsql database backend don't issue - warnings. Instead, use fbsql_errno to - retrieve the error code. Note that this function only returns the - error code from the most recently executed fbsql function (not - including fbsql_error and - fbsql_errno), so if you want to use it, make - sure you check the value before calling another fbsql function. - - + + + + fbsql_errno + Returns the numerical value of the error message from previous FrontBase operation + + + &reftitle.description; + + intfbsql_errno + resourcelink_identifier + + + Returns the error number from the last fbsql function, or + 0 (zero) if no error occurred. + + + Errors coming back from the fbsql database backend don't issue + warnings. Instead, use fbsql_errno to + retrieve the error code. Note that this function only returns the + error code from the most recently executed fbsql function (not + including fbsql_error and + fbsql_errno), so if you want to use it, make + sure you check the value before calling another fbsql function. + + "; ?> ]]> - - - - - See also: fbsql_error and - fbsql_warnings. - - - + + + + + See also: fbsql_error and + fbsql_warnings. + + + - - - - fbsql_error - - Returns the text of the error message from previous FrontBase - operation - - - - &reftitle.description; - - stringfbsql_error - resource - link_identifier - - - - Returns the error text from the last fbsql function, or - '' (the empty string) if no error occurred. - - - Errors coming back from the fbsql database backend don't issue - warnings. Instead, use fbsql_error to - retrieve the error text. Note that this function only returns the - error text from the most recently executed fbsql function (not - including fbsql_error and - fbsql_errno), so if you want to use it, make - sure you check the value before calling another fbsql function. - - + + + + fbsql_error + Returns the text of the error message from previous FrontBase operation + + + &reftitle.description; + + stringfbsql_error + resourcelink_identifier + + + Returns the error text from the last fbsql function, or + '' (the empty string) if no error occurred. + + + Errors coming back from the fbsql database backend don't issue + warnings. Instead, use fbsql_error to + retrieve the error text. Note that this function only returns the + error text from the most recently executed fbsql function (not + including fbsql_error and + fbsql_errno), so if you want to use it, make + sure you check the value before calling another fbsql function. + + "; ?> ]]> - - - - - See also: fbsql_errno and - fbsql_warnings. - - - + + + + + See also: fbsql_errno and + fbsql_warnings. + + + - - - - fbsql_fetch_array - - Fetch a result row as an associative array, a numeric array, or - both - - - - &reftitle.description; - - arrayfbsql_fetch_array - resourceresult - int - result_type - - - - Returns an array that corresponds to the fetched row, or &false; - if there are no more rows. - - - fbsql_fetch_array is an extended version of - fbsql_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 the numeric index of the column or - make an alias for the column. - - + + + + fbsql_fetch_array + Fetch a result row as an associative array, a numeric array, or both + + + &reftitle.description; + + arrayfbsql_fetch_array + resourceresult + intresult_type + + + Returns an array that corresponds to the fetched row, or &false; + if there are no more rows. + + + fbsql_fetch_array is an extended version of + fbsql_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 the numeric index of the column or + make an alias for the column. + + - - - - - An important thing to note is that using - fbsql_fetch_array is NOT significantly - slower than using fbsql_fetch_row, while it - provides a significant added value. - - - The optional second argument result_type - in fbsql_fetch_array is a constant and can - take the following values: FBSQL_ASSOC, FBSQL_NUM, and - FBSQL_BOTH. - - - For further details, see also - fbsql_fetch_row and - fbsql_fetch_assoc. - - - <function>fbsql_fetch_array</function> example - + + + + + An important thing to note is that using + fbsql_fetch_array is NOT significantly + slower than using fbsql_fetch_row, while it + provides a significant added value. + + + The optional second argument result_type + in fbsql_fetch_array is a constant and can + take the following values: FBSQL_ASSOC, FBSQL_NUM, and + FBSQL_BOTH. + + + For further details, see also + fbsql_fetch_row and + fbsql_fetch_assoc. + + + <function>fbsql_fetch_array</function> example + ]]> - - - - + + + + - - - - fbsql_fetch_assoc - - Fetch a result row as an associative array - - - - &reftitle.description; - - arrayfbsql_fetch_assoc - resourceresult - - - Returns an associative array that corresponds to the fetched row, - or &false; if there are no more rows. - - fbsql_fetch_assoc is equivalent to calling - fbsql_fetch_array with FBSQL_ASSOC for the - optional second parameter. It only returns an associative array. - This is the way fbsql_fetch_array originally - worked. If you need the numeric indices as well as the - associative, use fbsql_fetch_array. - - - 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 fbsql_fetch_array and - have it return the numeric indices as well. - - - An important thing to note is that using - fbsql_fetch_assoc is NOT significantly - slower than using fbsql_fetch_row, while it - provides a significant added value. - - - For further details, see also - fbsql_fetch_row and - fbsql_fetch_array. - - - <function>fbsql_fetch_assoc</function> example - + + + + fbsql_fetch_assoc + Fetch a result row as an associative array + + + &reftitle.description; + + arrayfbsql_fetch_assoc + resourceresult + + + Returns an associative array that corresponds to the fetched row, + or &false; if there are no more rows. + + fbsql_fetch_assoc is equivalent to calling + fbsql_fetch_array with FBSQL_ASSOC for the + optional second parameter. It only returns an associative array. + This is the way fbsql_fetch_array originally + worked. If you need the numeric indices as well as the + associative, use fbsql_fetch_array. + + + 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 fbsql_fetch_array and + have it return the numeric indices as well. + + + An important thing to note is that using + fbsql_fetch_assoc is NOT significantly + slower than using fbsql_fetch_row, while it + provides a significant added value. + + + For further details, see also + fbsql_fetch_row and + fbsql_fetch_array. + + + <function>fbsql_fetch_assoc</function> example + ]]> - - - - + + + + - - - - fbsql_fetch_field - - Get column information from a result and return as an object - - - - &reftitle.description; - - objectfbsql_fetch_field - resourceresult - int - field_offset - - - - Returns an object containing field information. - - - fbsql_fetch_field can be used in order to - obtain information about fields in a certain query result. If - the field offset isn't specified, the next field that wasn't yet - retrieved by fbsql_fetch_field is retrieved. - - - The properties of the object are: - - - - name - column name - - - - - table - name of the table the column belongs to - - - - - max_length - maximum length of the column - - - - - not_null - 1 if the column cannot be &null; - - - - - type - the type of the column - - - - - - <function>fbsql_fetch_field</function> example - + + + + fbsql_fetch_field + Get column information from a result and return as an object + + + &reftitle.description; + + objectfbsql_fetch_field + resourceresult + intfield_offset + + + Returns an object containing field information. + + + fbsql_fetch_field can be used in order to + obtain information about fields in a certain query result. If + the field offset isn't specified, the next field that wasn't yet + retrieved by fbsql_fetch_field is retrieved. + + + The properties of the object are: + + + + name - column name + + + + + table - name of the table the column belongs to + + + + + max_length - maximum length of the column + + + + + not_null - 1 if the column cannot be &null; + + + + + type - the type of the column + + + + + + <function>fbsql_fetch_field</function> example + type fbsql_free_result($result); ?> ]]> - - - - See also fbsql_field_seek. - - - + + + + See also fbsql_field_seek. + + + - - - - fbsql_fetch_lengths - - Get the length of each output in a result - - - - &reftitle.description; - - arrayfbsql_fetch_lengths - resourceresult - - - Returns: An array that corresponds to the lengths of each field - in the last row fetched by fbsql_fetch_row, - or &false; on error. - - - fbsql_fetch_lengths stores the lengths of - each result column in the last row returned by - fbsql_fetch_row, - fbsql_fetch_array and - fbsql_fetch_object in an array, starting at - offset 0. - - - See also: fbsql_fetch_row. - - - + + + + fbsql_fetch_lengths + Get the length of each output in a result + + + &reftitle.description; + + arrayfbsql_fetch_lengths + resourceresult + + + Returns: An array that corresponds to the lengths of each field + in the last row fetched by fbsql_fetch_row, + or &false; on error. + + + fbsql_fetch_lengths stores the lengths of + each result column in the last row returned by + fbsql_fetch_row, + fbsql_fetch_array and + fbsql_fetch_object in an array, starting at + offset 0. + + + See also: fbsql_fetch_row. + + + - - - - fbsql_fetch_object - Fetch a result row as an object - - - &reftitle.description; - - objectfbsql_fetch_object - resourceresult - int - result_type - - - - Returns an object with properties that correspond to the fetched - row, or &false; if there are no more rows. - - - fbsql_fetch_object is similar to - fbsql_fetch_array, with one difference - an - object is returned, instead of an array. Indirectly, that means - that you can only access the data by the field names, and not by - their offsets (numbers are illegal property names). - - - The optional argument result_type is a - constant and can take the following values: FBSQL_ASSOC, - FBSQL_NUM, and FBSQL_BOTH. - - - Speed-wise, the function is identical to - fbsql_fetch_array, and almost as quick as - fbsql_fetch_row (the difference is - insignificant). - - <function>fbsql_fetch_object</function> example - + + + + fbsql_fetch_object + Fetch a result row as an object + + + &reftitle.description; + + objectfbsql_fetch_object + resourceresult + intresult_type + + + Returns an object with properties that correspond to the fetched + row, or &false; if there are no more rows. + + + fbsql_fetch_object is similar to + fbsql_fetch_array, with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). + + + The optional argument result_type is a + constant and can take the following values: FBSQL_ASSOC, + FBSQL_NUM, and FBSQL_BOTH. + + + Speed-wise, the function is identical to + fbsql_fetch_array, and almost as quick as + fbsql_fetch_row (the difference is + insignificant). + + <function>fbsql_fetch_object</function> example + ]]> - - - - - See also: fbsql_fetch_array and - fbsql_fetch_row. - - - + + + + + See also: fbsql_fetch_array and + fbsql_fetch_row. + + + - - - - fbsql_fetch_row - Get a result row as an enumerated array - - - &reftitle.description; - - arrayfbsql_fetch_row - resourceresult - - - Returns: An array that corresponds to the fetched row, or &false; - if there are no more rows. - - - fbsql_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. - - - Subsequent call to fbsql_fetch_row would - return the next row in the result set, or &false; if there are no - more rows. - - - See also: fbsql_fetch_array, - fbsql_fetch_object, - fbsql_data_seek, - fbsql_fetch_lengths, and - fbsql_result. - - - + + + + fbsql_fetch_row + Get a result row as an enumerated array + + + &reftitle.description; + + arrayfbsql_fetch_row + resourceresult + + + Returns: An array that corresponds to the fetched row, or &false; + if there are no more rows. + + + fbsql_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. + + + Subsequent call to fbsql_fetch_row would + return the next row in the result set, or &false; if there are no + more rows. + + + See also: fbsql_fetch_array, + fbsql_fetch_object, + fbsql_data_seek, + fbsql_fetch_lengths, and + fbsql_result. + + + - - - - fbsql_field_flags - - Get the flags associated with the specified field in a result - - - - &reftitle.description; - - stringfbsql_field_flags - resourceresult - intfield_offset - - - fbsql_field_flags returns the field flags of - the specified field. The flags are reported as a single word - per flag separated by a single space, so that you can split the - returned value using explode. - - - + + + + fbsql_field_flags + Get the flags associated with the specified field in a result + + + &reftitle.description; + + stringfbsql_field_flags + resourceresult + intfield_offset + + + fbsql_field_flags returns the field flags of + the specified field. The flags are reported as a single word + per flag separated by a single space, so that you can split the + returned value using explode. + + + - - - - fbsql_field_len - - Returns the length of the specified field - - - - &reftitle.description; - - intfbsql_field_len - resourceresult - intfield_offset - - - fbsql_field_len returns the length of the - specified field. - - - + + + + fbsql_field_len + Returns the length of the specified field + + + &reftitle.description; + + intfbsql_field_len + resourceresult + intfield_offset + + + fbsql_field_len returns the length of the + specified field. + + + - - - - fbsql_field_name - - Get the name of the specified field in a result - - - - &reftitle.description; - - stringfbsql_field_name - resourceresult - intfield_index - - - fbsql_field_name returns the name of the - specified field index. result must be a - valid result identifier and field_index is - the numerical offset of the field. - - - - field_index starts at 0. - - - e.g. The index of the third field would actually be 2, the index - of the fourth field would be 3 and so on. - - - - - <function>fbsql_field_name</function> example - + + + + fbsql_field_name + Get the name of the specified field in a result + + + &reftitle.description; + + stringfbsql_field_name + resourceresult + intfield_index + + + fbsql_field_name returns the name of the + specified field index. result must be a + valid result identifier and field_index is + the numerical offset of the field. + + + + field_index starts at 0. + + + e.g. The index of the third field would actually be 2, the index + of the fourth field would be 3 and so on. + + + + + <function>fbsql_field_name</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - + + + + + - - - - fbsql_field_seek - - Set result pointer to a specified field offset - - - - &reftitle.description; - - boolfbsql_field_seek - resourceresult - intfield_offset - - - Seeks to the specified field offset. If the next call to - fbsql_fetch_field doesn't include a field - offset, the field offset specified in - fbsql_field_seek will be returned. - - - See also: fbsql_fetch_field. - - - + + + + fbsql_field_seek + Set result pointer to a specified field offset + + + &reftitle.description; + + boolfbsql_field_seek + resourceresult + intfield_offset + + + Seeks to the specified field offset. If the next call to + fbsql_fetch_field doesn't include a field + offset, the field offset specified in + fbsql_field_seek will be returned. + + + See also: fbsql_fetch_field. + + + - - - - fbsql_field_table - - Get name of the table the specified field is in - - - - &reftitle.description; - - stringfbsql_field_table - resourceresult - intfield_offset - - - Returns the name of the table that the specified field is - in. - - - + + + + fbsql_field_table + Get name of the table the specified field is in + + + &reftitle.description; + + stringfbsql_field_table + resourceresult + intfield_offset + + + Returns the name of the table that the specified field is + in. + + + - - - - fbsql_field_type - - Get the type of the specified field in a result - - - - &reftitle.description; - - stringfbsql_field_type - resourceresult - intfield_offset - - - fbsql_field_type is similar to the - fbsql_field_name function. The arguments are - identical, but the field type is returned instead. The field type - will be one of "int", "real", "string", "blob", and others as - detailed in the FrontBase - documentation. - - <function>fbsql_field_type</function> example - + + + + fbsql_field_type + Get the type of the specified field in a result + + + &reftitle.description; + + stringfbsql_field_type + resourceresult + intfield_offset + + + fbsql_field_type is similar to the + fbsql_field_name function. The arguments are + identical, but the field type is returned instead. The field type + will be one of "int", "real", "string", "blob", and others as + detailed in the FrontBase + documentation. + + <function>fbsql_field_type</function> example + "; -echo "The table has the following fields
"; +echo "The table has the following fields
"; while ($i < $fields) { $type = fbsql_field_type($result, $i); $name = fbsql_field_name($result, $i); @@ -49,11 +46,11 @@ fbsql_close(); ?> ]]> -
-
-
-
-
+
+
+
+
+
- - - - fbsql_free_result - Free result memory - - - &reftitle.description; - - boolfbsql_free_result - resourceresult - - - fbsql_free_result will free all memory - associated with the result identifier result. - - - fbsql_free_result only needs to be called if - you are concerned about how much memory is being used for queries - that return large result sets. All associated result memory is - automatically freed at the end of the script's execution. - - - + + + + fbsql_free_result + Free result memory + + + &reftitle.description; + + boolfbsql_free_result + resourceresult + + + fbsql_free_result will free all memory + associated with the result identifier result. + + + fbsql_free_result only needs to be called if + you are concerned about how much memory is being used for queries + that return large result sets. All associated result memory is + automatically freed at the end of the script's execution. + + + - - - - fbsql_get_autostart_info - No description given yet - - - &reftitle.description; - - arrayfbsql_get_autostart_info - resourcelink_identifier - - - &warn.undocumented.func; - - - + + + + fbsql_get_autostart_info + No description given yet + + + &reftitle.description; + + arrayfbsql_get_autostart_info + resourcelink_identifier + + + &warn.undocumented.func; + + + - - - - fbsql_hostname - Get or set the host name used with a connection - - - &reftitle.description; - - stringfbsql_hostname - resourcelink_identifier - stringhost_name - - - &warn.undocumented.func; - - - + + + + fbsql_hostname + Get or set the host name used with a connection + + + &reftitle.description; + + stringfbsql_hostname + resourcelink_identifier + stringhost_name + + &warn.undocumented.func; + + - - - - fbsql_insert_id - - Get the id generated from the previous INSERT operation - - - - &reftitle.description; - - intfbsql_insert_id - resource - link_identifier - - - - fbsql_insert_id returns the ID generated for - an column defined as DEFAULT UNIQUE by the previous INSERT query - using the given link_identifier. If - link_identifier isn't specified, the last - opened link is assumed. - - - fbsql_insert_id returns 0 if the previous - query does not generate an DEFAULT UNIQUE value. If you need to - save the value for later, be sure to call fbsql_insert_id() - immediately after the query that generates the value. - - - - The value of the FrontBase SQL function - fbsql_insert_id always contains the most - recently generated DEFAULT UNIQUE value, and is not reset - between queries. - - - - + + + + fbsql_insert_id + Get the id generated from the previous INSERT operation + + + &reftitle.description; + + intfbsql_insert_id + resourcelink_identifier + + + fbsql_insert_id returns the ID generated for + an column defined as DEFAULT UNIQUE by the previous INSERT query + using the given link_identifier. If + link_identifier isn't specified, the last + opened link is assumed. + + + fbsql_insert_id returns 0 if the previous + query does not generate an DEFAULT UNIQUE value. If you need to + save the value for later, be sure to call fbsql_insert_id() + immediately after the query that generates the value. + + + + The value of the FrontBase SQL function + fbsql_insert_id always contains the most + recently generated DEFAULT UNIQUE value, and is not reset + between queries. + + + + - - - - fbsql_list_dbs - - List databases available on a FrontBase server - - - - &reftitle.description; - - resourcefbsql_list_dbs - resource - link_identifier - - - - fbsql_list_dbs will return a result pointer - containing the databases available from the current fbsql - daemon. Use the fbsql_tablename function to - traverse this result pointer. - - - - <function>fbsql_list_dbs</function> example - + + + + fbsql_list_dbs + List databases available on a FrontBase server + + + &reftitle.description; + + resourcefbsql_list_dbs + resourcelink_identifier + + + fbsql_list_dbs will return a result pointer + containing the databases available from the current fbsql + daemon. Use the fbsql_tablename function to + traverse this result pointer. + + + + <function>fbsql_list_dbs</function> example + Database . "\n"; } ]]> - - &example.outputs; - + + &example.outputs; + - - - - - - The above code would just as easily work with - fbsql_fetch_row or other similar functions. - - - - + + + + + + The above code would just as easily work with + fbsql_fetch_row or other similar functions. + + + + - - - - fbsql_list_fields - List FrontBase result fields - - - &reftitle.description; - - resourcefbsql_list_fields - stringdatabase_name - stringtable_name - resource - link_identifier - - - - fbsql_list_fields retrieves information - about the given tablename. Arguments are the database name and - the table name. A result pointer is returned which can be used - with fbsql_field_flags, - fbsql_field_len, - fbsql_field_name, and - fbsql_field_type. - - - A result identifier is a positive integer. The function returns - &false; if an error occurs. A string describing the error will be - placed in $phperrmsg, and unless the function - was called as @fbsql() then this error string - will also be printed out. - - - - <function>fbsql_list_fields</function> example - + + + + fbsql_list_fields + List FrontBase result fields + + + &reftitle.description; + + resourcefbsql_list_fields + stringdatabase_name + stringtable_name + resourcelink_identifier + + + fbsql_list_fields retrieves information + about the given tablename. Arguments are the database name and + the table name. A result pointer is returned which can be used + with fbsql_field_flags, + fbsql_field_len, + fbsql_field_name, and + fbsql_field_type. + + + A result identifier is a positive integer. The function returns + &false; if an error occurs. A string describing the error will be + placed in $phperrmsg, and unless the function + was called as @fbsql() then this error string + will also be printed out. + + + + <function>fbsql_list_fields</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - + + + + + - - - - fbsql_list_tables - List tables in a FrontBase database - - - &reftitle.description; - - resourcefbsql_list_tables - stringdatabase - resource - link_identifier - - - - fbsql_list_tables takes a database name and - returns a result pointer much like the - fbsql_db_query function. The - fbsql_tablename function should be used to - extract the actual table names from the result pointer. - - - + + + + fbsql_list_tables + List tables in a FrontBase database + + + &reftitle.description; + + resourcefbsql_list_tables + stringdatabase + resourcelink_identifier + + + fbsql_list_tables takes a database name and + returns a result pointer much like the + fbsql_db_query function. The + fbsql_tablename function should be used to + extract the actual table names from the result pointer. + + + - - - - fbsql_next_result - - Move the internal result pointer to the next result - - - - &reftitle.description; - - boolfbsql_next_result - resourceresult_id - - - When sending more than one SQL statement to the server or - executing a stored procedure with multiple results will cause the - server to return multiple result sets. This function will test - for additional results available form the server. If an - additional result set exists it will free the existing result set - and prepare to fetch the words from the new result set. The - function will return &true; if an additional result set was - available or &false; otherwise. - - - <function>fbsql_next_result</function> example - + + + + fbsql_next_result + Move the internal result pointer to the next result + + + &reftitle.description; + + boolfbsql_next_result + resourceresult_id + + + When sending more than one SQL statement to the server or + executing a stored procedure with multiple results will cause the + server to return multiple result sets. This function will test + for additional results available form the server. If an + additional result set exists it will free the existing result set + and prepare to fetch the words from the new result set. The + function will return &true; if an additional result set was + available or &false; otherwise. + + + <function>fbsql_next_result</function> example + ]]> - - - - + + + + - - - - fbsql_num_fields - Get number of fields in result - - - &reftitle.description; - - intfbsql_num_fields - resourceresult - - - fbsql_num_fields returns the number of - fields in a result set. - - - See also: - fbsql_db_query, - fbsql_query, - fbsql_fetch_field, and - fbsql_num_rows. - - - + + + + fbsql_num_fields + Get number of fields in result + + + &reftitle.description; + + intfbsql_num_fields + resourceresult + + + fbsql_num_fields returns the number of + fields in a result set. + + + See also: + fbsql_db_query, + fbsql_query, + fbsql_fetch_field, and + fbsql_num_rows. + + + - - - - fbsql_num_rows - Get number of rows in result - - - &reftitle.description; - - intfbsql_num_rows - resourceresult - - - fbsql_num_rows returns the number of rows in - a result set. This command is only valid for SELECT statements. - To retrieve the number of rows returned from a INSERT, UPDATE or - DELETE query, use fbsql_affected_rows. - - <function>fbsql_num_rows</function> example - + + + + fbsql_num_rows + Get number of rows in result + + + &reftitle.description; + + intfbsql_num_rows + resourceresult + + + fbsql_num_rows returns the number of rows in + a result set. This command is only valid for SELECT statements. + To retrieve the number of rows returned from a INSERT, UPDATE or + DELETE query, use fbsql_affected_rows. + + <function>fbsql_num_rows</function> example + ]]> - - - - - See also: fbsql_affected_rows, - fbsql_connect, - fbsql_select_db, and - fbsql_query. - - - + + + + + See also: fbsql_affected_rows, + fbsql_connect, + fbsql_select_db, and + fbsql_query. + + + - - - - fbsql_password - Get or set the user password used with a connection - - - &reftitle.description; - - stringfbsql_password - resourcelink_identifier - stringpassword - - - &warn.undocumented.func; - - - + + + + fbsql_password + Get or set the user password used with a connection + + + &reftitle.description; + + stringfbsql_password + resourcelink_identifier + stringpassword + + &warn.undocumented.func; + + - - - - fbsql_pconnect - - Open a persistent connection to a FrontBase Server - - - - &reftitle.description; - - resourcefbsql_pconnect - stringhostname - stringusername - stringpassword - - - Returns: A positive FrontBase persistent link identifier on - success, or &false; on error. - - - fbsql_pconnect establishes a connection - to a FrontBase server. The following defaults are assumed for - missing optional parameters: host = - 'localhost', username = "_SYSTEM" - and password = empty password. - - - To set Frontbase server port number, use - fbsql_select_db. - - - fbsql_pconnect acts very much like - fbsql_connect with two major differences. - - - First, when connecting, the function would first try to find a - (persistent) link that's already open with the same host, - username and password. If one is found, an identifier for it - will be returned instead of opening a new connection. - - - Second, the connection to the SQL server will not be closed when - the execution of the script ends. Instead, the link will remain - open for future use. - - - This type of links is therefore called 'persistent'. - - - + + + + fbsql_pconnect + Open a persistent connection to a FrontBase Server + + + &reftitle.description; + + resourcefbsql_pconnect + stringhostname + stringusername + stringpassword + + + Returns: A positive FrontBase persistent link identifier on + success, or &false; on error. + + + fbsql_pconnect establishes a connection + to a FrontBase server. The following defaults are assumed for + missing optional parameters: host = + 'localhost', username = "_SYSTEM" + and password = empty password. + + + To set Frontbase server port number, use + fbsql_select_db. + + + fbsql_pconnect acts very much like + fbsql_connect with two major differences. + + + First, when connecting, the function would first try to find a + (persistent) link that's already open with the same host, + username and password. If one is found, an identifier for it + will be returned instead of opening a new connection. + + + Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use. + + + This type of links is therefore called 'persistent'. + + + - - - - fbsql_query - Send a FrontBase query - - - &reftitle.description; - - resourcefbsql_query - stringquery - resourcelink_identifier - intbatch_size - - - fbsql_query sends a query to the currently - active database on the server that's associated with the - specified link identifier. If - link_identifier isn't specified, the last - opened link is assumed. If no link is open, the function tries - to establish a link as if fbsql_connect was - called with no arguments, and use it. - - - - The query string shall always end with a semicolon. - - - - fbsql_query returns &true; (non-zero) or &false; - to indicate whether or not the query succeeded. A return value - of &true; means that the query was legal and could be executed by - the server. It does not indicate anything about the number of - rows affected or returned. It is perfectly possible for a query - to succeed but affect no rows or return no rows. - - - The following query is syntactically invalid, so - fbsql_query fails and returns &false;: - - <function>fbsql_query</function> example - + + + + fbsql_query + Send a FrontBase query + + + &reftitle.description; + + resourcefbsql_query + stringquery + resourcelink_identifier + intbatch_size + + + fbsql_query sends a query to the currently + active database on the server that's associated with the + specified link identifier. If + link_identifier isn't specified, the last + opened link is assumed. If no link is open, the function tries + to establish a link as if fbsql_connect was + called with no arguments, and use it. + + + + The query string shall always end with a semicolon. + + + + fbsql_query returns &true; (non-zero) or &false; + to indicate whether or not the query succeeded. A return value + of &true; means that the query was legal and could be executed by + the server. It does not indicate anything about the number of + rows affected or returned. It is perfectly possible for a query + to succeed but affect no rows or return no rows. + + + The following query is syntactically invalid, so + fbsql_query fails and returns &false;: + + <function>fbsql_query</function> example + ]]> - - - - - The following query is semantically invalid if - my_col is not a column in the table - my_tbl, so fbsql_query - fails and returns &false;: - - <function>fbsql_query</function> example - + + + + + The following query is semantically invalid if + my_col is not a column in the table + my_tbl, so fbsql_query + fails and returns &false;: + + <function>fbsql_query</function> example + ]]> - - - - - fbsql_query will also fail and return - &false; if you don't have permission to access the table(s) - referenced by the query. - - - Assuming the query succeeds, you can call - fbsql_num_rows to find out how many rows - were returned for a SELECT statement or - fbsql_affected_rows to find out how many - rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - statement. - - - For SELECT statements, fbsql_query returns a - new result identifier that you can pass to - fbsql_result. When you are done with the - result set, you can free the resources associated with it by - calling fbsql_free_result. Although, the - memory will automatically be freed at the end of the script's - execution. - - - See also: fbsql_affected_rows, - fbsql_db_query, - fbsql_free_result, - fbsql_result, - fbsql_select_db, and - fbsql_connect. - - - + + + + + fbsql_query will also fail and return + &false; if you don't have permission to access the table(s) + referenced by the query. + + + Assuming the query succeeds, you can call + fbsql_num_rows to find out how many rows + were returned for a SELECT statement or + fbsql_affected_rows to find out how many + rows were affected by a DELETE, INSERT, REPLACE, or UPDATE + statement. + + + For SELECT statements, fbsql_query returns a + new result identifier that you can pass to + fbsql_result. When you are done with the + result set, you can free the resources associated with it by + calling fbsql_free_result. Although, the + memory will automatically be freed at the end of the script's + execution. + + + See also: fbsql_affected_rows, + fbsql_db_query, + fbsql_free_result, + fbsql_result, + fbsql_select_db, and + fbsql_connect. + + + - - - - fbsql_read_blob - Read a BLOB from the database - - - &reftitle.description; - - stringfbsql_read_blob - stringblob_handle - resource - link_identifier - - - - Returns: A string containing the BLOB specified by blob_handle. - - - fbsql_read_blob reads BLOB data from the - database. If a select statement contains BLOB and/or CLOB - columns FrontBase will return the data directly when data is - fetched. This default behavior can be changed with - fbsql_set_lob_mode so the fetch functions - will return handles to BLOB and CLOB data. If a handle is - fetched a user must call fbsql_read_blob to - get the actual BLOB data from the database. - - - <function>fbsql_read_blob</function> example - + + + + fbsql_read_blob + Read a BLOB from the database + + + &reftitle.description; + + stringfbsql_read_blob + stringblob_handle + resourcelink_identifier + + + Returns: A string containing the BLOB specified by blob_handle. + + + fbsql_read_blob reads BLOB data from the + database. If a select statement contains BLOB and/or CLOB + columns FrontBase will return the data directly when data is + fetched. This default behavior can be changed with + fbsql_set_lob_mode so the fetch functions + will return handles to BLOB and CLOB data. If a handle is + fetched a user must call fbsql_read_blob to + get the actual BLOB data from the database. + + + <function>fbsql_read_blob</function> example + ]]> - - - - See also: fbsql_create_blob, - fbsql_read_clob, and - fbsql_set_lob_mode. - - - + + + + See also: fbsql_create_blob, + fbsql_read_clob, and + fbsql_set_lob_mode. + + + - - - - fbsql_read_clob - Read a CLOB from the database - - - &reftitle.description; - - stringfbsql_read_clob - stringclob_handle - resource - link_identifier - - - - Returns: A string containing the CLOB specified by clob_handle. - - - fbsql_read_clob reads CLOB data from the - database. If a select statement contains BLOB and/or CLOB - columns FrontBase will return the data directly when data is - fetched. This default behavior can be changed with - fbsql_set_lob_mode so the fetch functions - will return handles to BLOB and CLOB data. If a handle is - fetched a user must call fbsql_read_clob to - get the actual CLOB data from the database. - - - <function>fbsql_read_clob</function> example - + + + + fbsql_read_clob + Read a CLOB from the database + + + &reftitle.description; + + stringfbsql_read_clob + stringclob_handle + resourcelink_identifier + + + Returns: A string containing the CLOB specified by clob_handle. + + + fbsql_read_clob reads CLOB data from the + database. If a select statement contains BLOB and/or CLOB + columns FrontBase will return the data directly when data is + fetched. This default behavior can be changed with + fbsql_set_lob_mode so the fetch functions + will return handles to BLOB and CLOB data. If a handle is + fetched a user must call fbsql_read_clob to + get the actual CLOB data from the database. + + + <function>fbsql_read_clob</function> example + ]]> - - - - See also: fbsql_create_blob, - fbsql_read_blob, and - fbsql_set_lob_mode. - - - + + + + See also: fbsql_create_blob, + fbsql_read_blob, and + fbsql_set_lob_mode. + + + - - - - fbsql_result - Get result data - - - &reftitle.description; - - mixedfbsql_result - resourceresult - introw - mixedfield - - - fbsql_result returns the contents of one - cell from a FrontBase result set. The field argument can be the - field's offset, or the field's name, or the field's table dot - field's name (tabledname.fieldname). If the column name has been - aliased ('select foo as bar from...'), use the alias instead of - the column name. - - - When working on large result sets, you should consider using one - of the functions that fetch an entire row (specified below). As - these functions return the contents of multiple cells in one - function call, they're MUCH quicker than - fbsql_result. Also, note that specifying a - numeric offset for the field argument is much quicker than - specifying a fieldname or tablename.fieldname argument. - - - Calls to fbsql_result should not be mixed - with calls to other functions that deal with the result set. - - - Recommended high-performance alternatives: - fbsql_fetch_row, - fbsql_fetch_array, and - fbsql_fetch_object. - - - + + + + fbsql_result + Get result data + + + &reftitle.description; + + mixedfbsql_result + resourceresult + introw + mixedfield + + + fbsql_result returns the contents of one + cell from a FrontBase result set. The field argument can be the + field's offset, or the field's name, or the field's table dot + field's name (tabledname.fieldname). If the column name has been + aliased ('select foo as bar from...'), use the alias instead of + the column name. + + + When working on large result sets, you should consider using one + of the functions that fetch an entire row (specified below). As + these functions return the contents of multiple cells in one + function call, they're MUCH quicker than + fbsql_result. Also, note that specifying a + numeric offset for the field argument is much quicker than + specifying a fieldname or tablename.fieldname argument. + + + Calls to fbsql_result should not be mixed + with calls to other functions that deal with the result set. + + + Recommended high-performance alternatives: + fbsql_fetch_row, + fbsql_fetch_array, and + fbsql_fetch_object. + + + - - - - fbsql_rollback - Rollback a transaction to the database - - - &reftitle.description; - - boolfbsql_rollback - resource - link_identifier - - - - &return.success; - - - fbsql_rollback ends the current transaction by - rolling back all statements issued since last commit. - This command is only needed if autocommit is set to false. - - See also: - fbsql_autocommit and - fbsql_commit - - - + + + + fbsql_rollback + Rollback a transaction to the database + + + &reftitle.description; + + boolfbsql_rollback + resourcelink_identifier + + + &return.success; + + + fbsql_rollback ends the current transaction by + rolling back all statements issued since last commit. + This command is only needed if autocommit is set to false. + + See also: + fbsql_autocommit and + fbsql_commit + + + - - - - fbsql_select_db - Select a FrontBase database - - - &reftitle.description; - - boolfbsql_select_db - stringdatabase_name - resourcelink_identifier - - - fbsql_select_db sets the current active - database on the server that's associated with the specified link - identifier. If no link identifier is specified, the last opened - link is assumed. If no link is open, the function will try to - establish a link as if fbsql_connect was - called, and use it. - - - &return.success; - - - The client contacts FBExec to obtain the port number to use for - the connection to the database. If the database name is a number - the system will use that as a port number and it will not ask - FBExec for the port number. The FrontBase server can be stared - as FRontBase -FBExec=No -port=<port number> <database - name>. - - - Every subsequent call to fbsql_query will be - made on the active database. - - - if the database is protected with a database password, the user must - call fbsql_database_password before selecting - the database. - - - See also - fbsql_connect, - fbsql_pconnect, - fbsql_database_password, and - fbsql_query. - - - + + + + fbsql_select_db + Select a FrontBase database + + + &reftitle.description; + + boolfbsql_select_db + stringdatabase_name + resourcelink_identifier + + + fbsql_select_db sets the current active + database on the server that's associated with the specified link + identifier. If no link identifier is specified, the last opened + link is assumed. If no link is open, the function will try to + establish a link as if fbsql_connect was + called, and use it. + + + &return.success; + + + The client contacts FBExec to obtain the port number to use for + the connection to the database. If the database name is a number + the system will use that as a port number and it will not ask + FBExec for the port number. The FrontBase server can be stared + as FRontBase -FBExec=No -port=<port number> <database + name>. + + + Every subsequent call to fbsql_query will be + made on the active database. + + + if the database is protected with a database password, the user must + call fbsql_database_password before selecting + the database. + + + See also + fbsql_connect, + fbsql_pconnect, + fbsql_database_password, and + fbsql_query. + + + - - - - fbsql_set_lob_mode - - Set the LOB retrieve mode for a FrontBase result set - - - - &reftitle.description; - - boolfbsql_set_lob_mode - resourceresult - stringdatabase_name - - - Returns: &true; on success, &false; on error. - - - fbsql_set_lob_mode sets the mode for - retrieving LOB data from the database. When BLOB and CLOB data is - stored in FrontBase it can be stored direct or indirect. Direct - stored LOB data will always be fetched no matter the setting of - the lob mode. If the LOB data is less than 512 bytes it will - always be stored directly. - - - - FBSQL_LOB_DIRECT - LOB data is retrieved directly. When data - is fetched from the database with - fbsql_fetch_row, and other fetch - functions, all CLOB and BLOB columns will be returned as - ordinary columns. This is the default value on a new - FrontBase result. - - - - - FBSQL_LOB_HANDLE - LOB data is retrieved as handles to the - data. When data is fetched from the database with - fbsql_fetch_row, and other fetch - functions, LOB data will be returned as a handle to the data - if the data is stored indirect or the data if it is stored - direct. If a handle is returned it will be a 27 byte string - formatted as "@'000000000000000000000000'". - - - - - See also: - fbsql_create_blob, - fbsql_create_clob, - fbsql_read_blob, and - fbsql_read_clob. - - - + + + + fbsql_set_lob_mode + Set the LOB retrieve mode for a FrontBase result set + + + &reftitle.description; + + boolfbsql_set_lob_mode + resourceresult + stringdatabase_name + + + Returns: &true; on success, &false; on error. + + + fbsql_set_lob_mode sets the mode for + retrieving LOB data from the database. When BLOB and CLOB data is + stored in FrontBase it can be stored direct or indirect. Direct + stored LOB data will always be fetched no matter the setting of + the lob mode. If the LOB data is less than 512 bytes it will + always be stored directly. + + + + FBSQL_LOB_DIRECT - LOB data is retrieved directly. When data + is fetched from the database with + fbsql_fetch_row, and other fetch + functions, all CLOB and BLOB columns will be returned as + ordinary columns. This is the default value on a new + FrontBase result. + + + + + FBSQL_LOB_HANDLE - LOB data is retrieved as handles to the + data. When data is fetched from the database with + fbsql_fetch_row, and other fetch + functions, LOB data will be returned as a handle to the data + if the data is stored indirect or the data if it is stored + direct. If a handle is returned it will be a 27 byte string + formatted as "@'000000000000000000000000'". + + + + + See also: + fbsql_create_blob, + fbsql_create_clob, + fbsql_read_blob, and + fbsql_read_clob. + + + - - - fbsql_set_password - - Change the password for a given user - - - - &reftitle.description; - - boolfbsql_set_password - resourcelink_identifier - stringuser - stringpassword - stringold_password - + + + + fbsql_set_password + Change the password for a given user + + + &reftitle.description; + + boolfbsql_set_password + resourcelink_identifier + stringuser + stringpassword + stringold_password + - &warn.undocumented.func; + &warn.undocumented.func; - - + + - - - - fbsql_set_transaction - - Set the transaction locking and isolation - - - - &reftitle.description; - - voidfbsql_set_transaction - resourcelink_identifier - intLocking - intIsolation - - - &warn.undocumented.func; - - - + + + + fbsql_set_transaction + Set the transaction locking and isolation + + + &reftitle.description; + + voidfbsql_set_transaction + resourcelink_identifier + intLocking + intIsolation + + &warn.undocumented.func; + + - - - - fbsql_start_db - Start a database on local or remote server - - - &reftitle.description; - - boolfbsql_start_db - stringdatabase_name - resourcelink_identifier - stringdatabase_options - - - &return.success; - - - fbsql_start_db - - - See also: fbsql_db_status and - fbsql_stop_db. - - - + + + + fbsql_start_db + Start a database on local or remote server + + + &reftitle.description; + + boolfbsql_start_db + stringdatabase_name + resourcelink_identifier + stringdatabase_options + + + &return.success; + + + fbsql_start_db + + + See also: fbsql_db_status and + fbsql_stop_db. + + + - - - - fbsql_stop_db - Stop a database on local or remote server - - - &reftitle.description; - - boolfbsql_stop_db - stringdatabase_name - resource - link_identifier - - - - &return.success; - - - fbsql_stop_db - - - See also: fbsql_db_status and - fbsql_start_db. - - - + + + + fbsql_stop_db + Stop a database on local or remote server + + + &reftitle.description; + + boolfbsql_stop_db + stringdatabase_name + resourcelink_identifier + + + &return.success; + + + fbsql_stop_db + + + See also: fbsql_db_status and + fbsql_start_db. + + + - - - - fbsql_tablename - Get table name of field - - - &reftitle.description; - - stringfbsql_tablename - resourceresult - inti - - - fbsql_tablename takes a result pointer - returned by the fbsql_list_tables function - as well as an integer index and returns the name of a table. The - fbsql_num_rows function may be used to - determine the number of tables in the result pointer. - - <function>fbsql_tablename</function> example - + + + + fbsql_tablename + Get table name of field + + + &reftitle.description; + + stringfbsql_tablename + resourceresult + inti + + + fbsql_tablename takes a result pointer + returned by the fbsql_list_tables function + as well as an integer index and returns the name of a table. The + fbsql_num_rows function may be used to + determine the number of tables in the result pointer. + + <function>fbsql_tablename</function> example + ]]> - - - - - + + + + + - - - - fbsql_username - Get or set the host user used with a connection - - - &reftitle.description; - - stringfbsql_username - resourcelink_identifier - stringusername - - - &warn.undocumented.func; - - - + + + + fbsql_username + Get or set the host user used with a connection + + + &reftitle.description; + + stringfbsql_username + resourcelink_identifier + stringusername + + &warn.undocumented.func; + + - - - - fbsql_warnings - Enable or disable FrontBase warnings - - - &reftitle.description; - - boolfbsql_warnings - bool - OnOff - - - - Returns &true; if warnings is turned on otherwise &false;. - - - fbsql_warnings enables or disables FrontBase - warnings. - - - + + + + fbsql_warnings + Enable or disable FrontBase warnings + + + &reftitle.description; + + boolfbsql_warnings + boolOnOff + + + Returns &true; if warnings is turned on otherwise &false;. + + + fbsql_warnings enables or disables FrontBase + warnings. + + +