From e889596dc3d2ee76f30be4d90d810b886014b43c Mon Sep 17 00:00:00 2001 From: Kontra Gergely Date: Tue, 15 Jan 2002 12:57:14 +0000 Subject: [PATCH] Trailing spaces, tabs git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67822 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/mysql.xml | 312 ++++++++++++++++++++++---------------------- 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/functions/mysql.xml b/functions/mysql.xml index 6289be06d1..bf026b6d2a 100644 --- a/functions/mysql.xml +++ b/functions/mysql.xml @@ -1,5 +1,5 @@ - + MySQL Functions MySQL @@ -27,7 +27,7 @@ url="&url.mysql.docs;">&url.mysql.docs;. - The behaviour of the MySQL functions is affected by settings in the global + The behaviour of the MySQL functions is affected by settings in the global configuration file. <link linkend="ini.sect.mysql">MySQL Configuration </link> Options @@ -122,7 +122,7 @@ mysql_close($link); - mysql_affected_rows + mysql_affected_rows Get number of affected rows in previous MySQL operation @@ -131,14 +131,14 @@ mysql_close($link); int mysql_affected_rows - resource + resource link_identifier - + mysql_affected_rows returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with link_identifier. If the @@ -183,7 +183,7 @@ mysql_close($link); - mysql_change_user + mysql_change_user Change logged in user of the active connection @@ -195,34 +195,34 @@ mysql_close($link); int mysql_change_user string user string password - string + string database - resource + resource link_identifier - + mysql_change_user changes the logged in user - of the current active connection, or the connection given by the + of the current active connection, or the connection given by the optional link_identifier parameter. 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. - + This function was introduced in PHP 3.0.13 and requires MySQL - 3.23.3 or higher. + 3.23.3 or higher. @@ -238,9 +238,9 @@ mysql_close($link); bool mysql_close - resource + resource - link_identifier + link_identifier @@ -256,12 +256,12 @@ mysql_close($link); Using mysql_close isn't usually necessary, as non-persistent open links are automatically closed at the end - of the script's execution. See also - freeing + of the script's execution. See also + freeing resources. - + mysql_close will not close persistent links created by mysql_pconnect. @@ -279,7 +279,7 @@ mysql_close($link); ]]> - + See also: mysql_connect, and mysql_pconnect. @@ -296,24 +296,24 @@ mysql_close($link); resource mysql_connect - string + string server - string + string username - string + string password - + Returns a MySQL link identifier on success, or &false; on failure. @@ -321,7 +321,7 @@ mysql_close($link); to a MySQL server. The following defaults are assumed for missing optional parameters: server = 'localhost:3306', username = name of the - user that owns the server process and + user that owns the server process and password = empty password. @@ -352,7 +352,7 @@ mysql_close($link); 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 mysql_close. - + MySQL connect example @@ -384,14 +384,14 @@ mysql_close($link); bool mysql_create_db string database name - resource + resource link_identifier - + mysql_create_db attempts to create a new database on the server associated with the specified link identifier. @@ -415,11 +415,11 @@ mysql_close($link); ]]> - + For downwards compatibility mysql_createdb can also be used. This is deprecated, however. - + See also: mysql_drop_db. @@ -442,7 +442,7 @@ mysql_close($link); &return.success; - + 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 @@ -500,14 +500,14 @@ mysql_close($link); string mysql_db_name resource result int row - mixed + mixed field - + mysql_db_name takes as its first parameter the result pointer from a call to mysql_list_dbs. The @@ -524,7 +524,7 @@ mysql_close($link); <function>mysql_db_name</function> example resource mysql_db_query string database string query - resource + resource link_identifier - + Returns a positive MySQL result resource to the query result, or &false; on error. - + mysql_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 @@ -578,14 +578,14 @@ while ($i < $cnt) { as if mysql_connect was called with no arguments - + See also mysql_connect and mysql_query. - This function has been deprecated since PHP 4.0.6. + This function has been deprecated since PHP 4.0.6. Do not use this function. Use mysql_select_db and mysql_query instead. @@ -605,17 +605,17 @@ while ($i < $cnt) { bool mysql_drop_db string database_name - resource + resource link_identifier - + &return.success; - - + + mysql_drop_db attempts to drop (remove) an entire database from the server associated with the specified link identifier. @@ -624,7 +624,7 @@ while ($i < $cnt) { For downward compatibility mysql_dropdb can also be used. This is deprecated, however. - + See also: mysql_create_db. @@ -632,7 +632,7 @@ while ($i < $cnt) { - mysql_errno + mysql_errno Returns the numerical value of the error message from previous MySQL operation @@ -643,7 +643,7 @@ while ($i < $cnt) { int mysql_errno - resource + resource link_identifier @@ -678,7 +678,7 @@ echo mysql_errno().": ".mysql_error()."
";
- + See also: mysql_error @@ -697,7 +697,7 @@ echo mysql_errno().": ".mysql_error()."
"; string mysql_error - resource + resource link_identifier @@ -731,7 +731,7 @@ echo mysql_errno().": ".mysql_error()."
";
- + See also: mysql_errno @@ -739,7 +739,7 @@ echo mysql_errno().": ".mysql_error()."
"; - mysql_escape_string + mysql_escape_string Escapes a string for use in a mysql_query. @@ -767,7 +767,7 @@ echo mysql_errno().": ".mysql_error()."
"; - mysql_fetch_array + mysql_fetch_array Fetch a result row as an associative array, a numeric array, or both. @@ -785,7 +785,7 @@ echo mysql_errno().": ".mysql_error()."
";
- + Returns an array that corresponds to the fetched row, or &false; if there are no more rows. @@ -839,7 +839,7 @@ select tone.field as foo ttwo.field as bar from tone, ttwo <function>mysql_fetch_array</function> example - mysql_fetch_assoc + mysql_fetch_assoc Fetch a result row as an associative array @@ -872,7 +872,7 @@ mysql_free_result($result); resource result - + Returns an associative array that corresponds to the fetched row, or &false; if there are no more rows. @@ -908,7 +908,7 @@ mysql_free_result($result); <function>mysql_fetch_assoc</function> object mysql_fetch_field resource result - int + int field_offset @@ -947,7 +947,7 @@ mysql_free_result($result); Returns an object containing field information. - + mysql_fetch_field can be used in order to obtain information about fields in a certain query result. If @@ -959,62 +959,62 @@ mysql_free_result($result); - name - column name + name - column name - table - name of the table the column belongs to + table - name of the table the column belongs to - max_length - maximum length of the column + max_length - maximum length of the column - not_null - 1 if the column cannot be &null; - - - - - primary_key - 1 if the column is a primary key - - - - - unique_key - 1 if the column is a unique key - - - - - multiple_key - 1 if the column is a non-unique key - - - - - numeric - 1 if the column is numeric - - - - - blob - 1 if the column is a BLOB + not_null - 1 if the column cannot be &null; - type - the type of the column + primary_key - 1 if the column is a primary key - unsigned - 1 if the column is unsigned + unique_key - 1 if the column is a unique key - zerofill - 1 if the column is zero-filled + multiple_key - 1 if the column is a non-unique key + + + + + numeric - 1 if the column is numeric + + + + + blob - 1 if the column is a BLOB + + + + + type - the type of the column + + + + + unsigned - 1 if the column is unsigned + + + + + zerofill - 1 if the column is zero-filled @@ -1023,7 +1023,7 @@ mysql_free_result($result); <function>mysql_fetch_field</function> - mysql_fetch_lengths + mysql_fetch_lengths Get the length of each output in a result @@ -1079,11 +1079,11 @@ mysql_free_result($result); resource result - + Returns an array that corresponds to the lengths of each field in the last row fetched by mysql_fetch_row, or &false; on error. - + mysql_fetch_lengths stores the lengths of each result column in the last row returned by @@ -1091,8 +1091,8 @@ mysql_free_result($result); mysql_fetch_array, and mysql_fetch_object in an array, starting at offset 0. - - + + See also: mysql_fetch_row. @@ -1116,11 +1116,11 @@ mysql_free_result($result);
- + Returns an object with properties that correspond to the fetched row, or &false; if there are no more rows. - + mysql_fetch_object is similar to mysql_fetch_array, with one difference - an object is returned, instead of an array. Indirectly, that means @@ -1143,7 +1143,7 @@ mysql_free_result($result); <function>mysql_fetch_object</function> example - + See also: mysql_fetch_array and mysql_fetch_row. @@ -1177,7 +1177,7 @@ mysql_free_result($result); resource result - + Returns an array that corresponds to the fetched row, or &false; if there are no more rows. @@ -1218,7 +1218,7 @@ mysql_free_result($result); int field_offset - + mysql_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 @@ -1229,7 +1229,7 @@ mysql_free_result($result); "unique_key", "multiple_key", "blob", "unsigned", "zerofill", "binary", "enum", "auto_increment", "timestamp". - + For downward compatibility mysql_fieldflags can also be used. This is deprecated, however. @@ -1238,7 +1238,7 @@ mysql_free_result($result); - mysql_field_name + mysql_field_name Get the name of the specified field in a result @@ -1272,7 +1272,7 @@ mysql_free_result($result); <function>mysql_field_name</function> example - mysql_field_len + mysql_field_len Returns the length of the specified field @@ -1374,7 +1374,7 @@ password int field_offset - + Returns the name of the table that the specifed field is in. @@ -1412,7 +1412,7 @@ password MySQL field types "; -echo "The table has the following fields
"; +echo "The table has the following fields
"; while ($i < $fields) { $type = mysql_field_type($result, $i); $name = mysql_field_name($result, $i); @@ -1438,7 +1438,7 @@ mysql_close();
- + For downward compatibility mysql_fieldtype can also be used. This is deprecated, however. @@ -1491,7 +1491,7 @@ mysql_close(); int mysql_insert_id - resource + resource link_identifier @@ -1537,7 +1537,7 @@ mysql_close(); - mysql_list_dbs + mysql_list_dbs List databases available on a MySQL server @@ -1547,7 +1547,7 @@ mysql_close(); resource mysql_list_dbs - resource + resource link_identifier @@ -1616,7 +1616,7 @@ database3 resource mysql_list_fields string database_name string table_name - resource + resource link_identifier @@ -1667,7 +1667,7 @@ field3
@@ -1683,14 +1683,14 @@ field3 resource mysql_list_tables string database - resource + resource link_identifier - + mysql_list_tables takes a database name and returns a result pointer much like the mysql_db_query function. You can use the @@ -1718,12 +1718,12 @@ field3 resource result - + mysql_num_fields returns the number of fields in a result set. - - See also: + + See also: mysql_db_query, mysql_query, mysql_fetch_field, @@ -1750,8 +1750,8 @@ field3 mysql_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 affected by a INSERT, UPDATE or + a result set. This command is only valid for SELECT statements. + To retrieve the number of rows affected by a INSERT, UPDATE or DELETE query, use mysql_affected_rows. <function>mysql_num_rows</function> example @@ -1759,11 +1759,11 @@ field3 - See also: - mysql_affected_rows, - mysql_connect, - mysql_select_db, and + See also: + mysql_affected_rows, + mysql_connect, + mysql_select_db, and mysql_query. @@ -1788,7 +1788,7 @@ echo "$num_rows Rows\n"; - mysql_pconnect + mysql_pconnect Open a persistent connection to a MySQL server @@ -1798,20 +1798,20 @@ echo "$num_rows Rows\n"; resource mysql_pconnect - string + string server - string + string username - string + string password - + Returns a positive MySQL persistent link identifier on success, or &false; on error. @@ -1836,26 +1836,26 @@ echo "$num_rows Rows\n"; 3.0.10. - - + + mysql_pconnect acts very much like mysql_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 (mysql_close will not close links established by mysql_pconnect). - + This type of link is therefore called 'persistent'. @@ -1887,12 +1887,12 @@ echo "$num_rows Rows\n"; resource mysql_query string query - resource + resource link_identifier - + mysql_query sends a query to the currently active database on the server that's associated with the specified link identifier. If @@ -2001,12 +2001,12 @@ $result = mysql_query("SELECT my_col FROM my_tbl") resource mysql_unbuffered_query string query - resource + resource link_identifier - + mysql_unbuffered_query sends a SQL query query to MySQL, without fetching and buffering the result rows automatically, as @@ -2047,7 +2047,7 @@ $result = mysql_query("SELECT my_col FROM my_tbl") mixed mysql_result resource result int row - mixed + mixed field @@ -2077,7 +2077,7 @@ $result = mysql_query("SELECT my_col FROM my_tbl") Recommended high-performance alternatives: - mysql_fetch_row, + mysql_fetch_row, mysql_fetch_array, and mysql_fetch_object. @@ -2095,17 +2095,17 @@ $result = mysql_query("SELECT my_col FROM my_tbl") bool mysql_select_db string database_name - resource + resource link_identifier - + &return.success; - + mysql_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 @@ -2118,7 +2118,7 @@ $result = mysql_query("SELECT my_col FROM my_tbl") made on the active database. See also: - mysql_connect, + mysql_connect, mysql_pconnect, and mysql_query. @@ -2143,7 +2143,7 @@ $result = mysql_query("SELECT my_col FROM my_tbl") int i - + mysql_tablename takes a result pointer returned by the mysql_list_tables function as well as an integer index and returns the name of a table. The @@ -2153,7 +2153,7 @@ $result = mysql_query("SELECT my_col FROM my_tbl") <function>mysql_tablename</function> Example - + mysql_get_client_info returns a string that represents the client library version. @@ -2201,12 +2201,12 @@ for ($i = 0; $i < mysql_num_rows($result); $i++) { string mysql_get_host_info - resource + resource link_identifier - + mysql_get_host_info returns a string describing the type of connection in use for the connection link_identifier, including the server host @@ -2229,12 +2229,12 @@ for ($i = 0; $i < mysql_num_rows($result); $i++) { int mysql_get_proto_info - resource + resource link_identifier - + mysql_get_proto_info returns the protocol version used by connection link_identifier. If @@ -2257,12 +2257,12 @@ for ($i = 0; $i < mysql_num_rows($result); $i++) { int mysql_get_server_info - resource + resource link_identifier - + mysql_get_server_info returns the server version used by connection link_identifier. If