From c315196775bf233c287ad09fc5f5220b15663064 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 30 Mar 2005 05:05:08 +0000 Subject: [PATCH] Moved to new doc style; and other misc. changes including use of new entities. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183139 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../mysql/functions/mysql-affected-rows.xml | 141 +++++++++++------- .../mysql/functions/mysql-change-user.xml | 120 ++++++++++++--- .../mysql/functions/mysql-client-encoding.xml | 56 +++++-- reference/mysql/functions/mysql-close.xml | 87 +++++++---- reference/mysql/functions/mysql-create-db.xml | 99 ++++++++---- reference/mysql/functions/mysql-data-seek.xml | 88 ++++++++--- 6 files changed, 423 insertions(+), 168 deletions(-) diff --git a/reference/mysql/functions/mysql-affected-rows.xml b/reference/mysql/functions/mysql-affected-rows.xml index e848193392..9c417b867e 100644 --- a/reference/mysql/functions/mysql-affected-rows.xml +++ b/reference/mysql/functions/mysql-affected-rows.xml @@ -1,65 +1,70 @@ - - + mysql_affected_rows - Get number of affected rows in previous MySQL - operation + Get number of affected rows in previous MySQL operation - - Description - - intmysql_affected_rows - resource - link_identifier - - + + + &reftitle.description; + + intmysql_affected_rows + resourcelink_identifier + - mysql_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 - mysql_connect is assumed. + Get the number of affected rows by the last INSERT, UPDATE or DELETE query + associated with link_identifier. + + + + + &reftitle.parameters; + + + + link_identifier + + &mysql.linkid.description; + + + + + + + + &reftitle.returnvalues; + + Returns the number of affected rows on success, and -1 if the last query + failed. - - - If you are using transactions, you need to call - mysql_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 with MySQL versions prior to 4.1.2. - - - When using UPDATE, MySQL will not update columns where the new - value is the same as the old value. This creates the possibility - that mysql_affected_rows may not actually - equal the number of rows matched, only the number of rows that - were literally affected by the query. - - - The REPLACE statement first deletes the record with the same primary key and - then inserts the new record. This function returns the number of deleted - records plus the number of inserted records. - - - To retrieve the number of rows returned by a SELECT, it is possible to - use also mysql_num_rows. + When using UPDATE, MySQL will not update columns where the new value is the + same as the old value. This creates the possibility that + mysql_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. + The REPLACE statement first deletes the record with the same primary key + and then inserts the new record. This function returns the number of + deleted records plus the number of inserted records. + + + + + &reftitle.examples; + - Delete-Query + <function>mysql_affected_rows</function> example ]]> - - The above example would produce the following output: - + &example.outputs.similar; - Update-Query + <function>mysql_affected_rows</function> example using transactions ]]> - - The above example would produce the following output: - + &example.outputs.similar; - + + + + + &reftitle.notes; + + Transactions + + If you are using transactions, you need to call + mysql_affected_rows after your INSERT, UPDATE, or + DELETE query, not after the COMMIT. + + + + SELECT Statements + + To retrieve the number of rows returned by a SELECT, it is possible to + use mysql_num_rows. + + + + + + &reftitle.seealso; - See also mysql_num_rows, and - mysql_info. + + mysql_num_rows + mysql_info + diff --git a/reference/mysql/functions/mysql-change-user.xml b/reference/mysql/functions/mysql-change-user.xml index 1f94f36538..f68880f149 100644 --- a/reference/mysql/functions/mysql-change-user.xml +++ b/reference/mysql/functions/mysql-change-user.xml @@ -1,26 +1,20 @@ - - + mysql_change_user - - Change logged in user of the active connection - + Change logged in user of the active connection - - Description - - intmysql_change_user - stringuser - stringpassword - string - database - - resource - link_identifier - - + + + &reftitle.description; + + intmysql_change_user + stringuser + stringpassword + stringdatabase + resourcelink_identifier + mysql_change_user changes the logged in user of the current active connection, or the connection given by the @@ -28,16 +22,102 @@ database is specified, this will be the current database after the user has been changed. If the new user and password authorization fails, the current connected user stays active. + + + This function is deprecated and no longer exists in PHP. + + + + + &reftitle.parameters; + + + + user + + + The new MySQL username. + + + + + password + + + The new MySQL password. + + + + + database + + + The MySQL database. If not specified, the current selected database + is used. + + + + + link_identifier + + &mysql.linkid.description; + + + + + + + + &reftitle.returnvalues; + &return.success; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 3.0.14 + + This function was removed from PHP. + + + + + + + + + + &reftitle.notes; + Requirements - This deprecated function is only available in PHP 3 and requires MySQL - 3.23.3 or higher. + This function requires MySQL 3.23.3 or higher. + + + &reftitle.seealso; + + + mysql_connect + mysql_select_db + mysql_query + + + - + mysql_client_encoding Returns the name of the character set - - Description + + + &reftitle.description; stringmysql_client_encoding resourcelink_identifier - mysql_client_encoding returns the default - character set name for the current connection. + Retrieves the character_set variable from MySQL. + + + + &reftitle.parameters; + + + + link_identifier + + &mysql.linkid.description; + + + + + + + + &reftitle.returnvalues; + + Returns the default character set name for the current connection. + + + + + &reftitle.examples; <function>mysql_client_encoding</function> example ]]> - - The above example would produce the following output: - + &example.outputs.similar; + + + + &reftitle.seealso; - See also - mysql_real_escape_string + + mysql_real_escape_string + diff --git a/reference/mysql/functions/mysql-close.xml b/reference/mysql/functions/mysql-close.xml index 3dc6be961a..494c12d1ff 100644 --- a/reference/mysql/functions/mysql-close.xml +++ b/reference/mysql/functions/mysql-close.xml @@ -1,26 +1,22 @@ - - + mysql_close Close MySQL connection - - Description - - boolmysql_close - resource - link_identifier - - - - &return.success; - - mysql_close closes the connection to - the MySQL server that's associated with the specified link - identifier. If link_identifier isn't - specified, the last opened link is used. + + + &reftitle.description; + + boolmysql_close + resourcelink_identifier + + + mysql_close closes the non-persistent connection to + the MySQL server that's associated with the specified link identifier. If + link_identifier isn't specified, the last opened + link is used. Using mysql_close isn't usually necessary, @@ -29,12 +25,31 @@ freeing resources. - - - mysql_close will not close persistent links - created by mysql_pconnect. - - + + + + &reftitle.parameters; + + + + link_identifier + + &mysql.linkid.description; + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>mysql_close</function> example @@ -50,11 +65,33 @@ mysql_close($link); ?> ]]> + &example.outputs; + + + + + + + &reftitle.notes; + + + mysql_close will not close persistent links + created by mysql_pconnect. + + + + + + &reftitle.seealso; - See also mysql_connect and - mysql_pconnect. + + mysql_connect + mysql_free_result + diff --git a/reference/mysql/functions/mysql-create-db.xml b/reference/mysql/functions/mysql-create-db.xml index 2d3c86427b..93e5f46fd6 100644 --- a/reference/mysql/functions/mysql-create-db.xml +++ b/reference/mysql/functions/mysql-create-db.xml @@ -1,38 +1,62 @@ - - + mysql_create_db Create a MySQL database - - Description - - boolmysql_create_db - stringdatabase_name - resource - link_identifier - - + + &reftitle.description; + + boolmysql_create_db + stringdatabase_name + resourcelink_identifier + mysql_create_db attempts to create a new database on the server associated with the specified link identifier. + + + &reftitle.parameters; + + + + database_name + + + The name of the database being created. + + + + + link_identifier + + &mysql.linkid.description; + + + + + + + + &reftitle.returnvalues; &return.success; - - - The function mysql_create_db is deprecated. It - is preferable to use mysql_query to issue a sql - CREATE DATABASE statement instead. - - + + + + &reftitle.examples; <function>mysql_create_db</function> alternative example + + The function mysql_create_db is deprecated. It is + preferable to use mysql_query to issue a sql + CREATE DATABASE statement instead. + ]]> + &example.outputs.similar; + + + - - For downwards compatibility mysql_createdb - can also be used. This is deprecated, however. - - + + + + &reftitle.notes; + - This function will not be available - if the MySQL extension was built against a MySQL 4.x client library. - - + For downwards compatibility mysql_createdb + can also be used. This is deprecated, however. + + + + + This function will not be available if the MySQL extension was built + against a MySQL 4.x client library. + + + + + + &reftitle.seealso; - See also mysql_query. + + mysql_query + mysql_select_db + diff --git a/reference/mysql/functions/mysql-data-seek.xml b/reference/mysql/functions/mysql-data-seek.xml index 29cc56c5fd..9a883ced26 100644 --- a/reference/mysql/functions/mysql-data-seek.xml +++ b/reference/mysql/functions/mysql-data-seek.xml @@ -1,6 +1,5 @@ - - + mysql_data_seek @@ -8,20 +7,17 @@ Description - - boolmysql_data_seek - resourceresult_identifier - introw_number - + + boolmysql_data_seek + resourceresult_identifier + introw_number + mysql_data_seek moves the internal row pointer of the MySQL result associated with the specified result identifier to point to the specified row number. The next call to mysql_fetch_row would return that row. - - &return.success; - row_number starts at 0. The row_number should be a value in the range from 0 to @@ -30,13 +26,41 @@ fail with a E_WARNING and mysql_data_seek will return &false;. - - - The function mysql_data_seek can be used in - conjunction only with mysql_query, not with - mysql_unbuffered_query. - - + + + + &reftitle.parameters; + + + + result_identifier + + + The MySQL result identifier that is being seeked. + + + + + row_number + + + The desired row number of the new result pointer. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>mysql_data_seek</function> example @@ -76,14 +100,30 @@ mysql_free_result($result); + + + + &reftitle.notes; + + + The function mysql_data_seek can be used in + conjunction only with mysql_query, not with + mysql_unbuffered_query. + + + + + + &reftitle.seealso; - See also - mysql_query, - mysql_num_rows, - mysql_fetch_row, - mysql_fetch_assoc, - mysql_fetch_array, and - mysql_fetch_object. + + mysql_query + mysql_num_rows + mysql_fetch_row + mysql_fetch_assoc + mysql_fetch_array + mysql_fetch_object +