mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Only whitespace.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@56546 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3f0b8e9ec9
commit
de9fbf7367
1 changed files with 93 additions and 72 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.64 $ -->
|
||||
<!-- $Revision: 1.65 $ -->
|
||||
<reference id="ref.mysql">
|
||||
<title>MySQL functions</title>
|
||||
<title>MySQL Functions</title>
|
||||
<titleabbrev>MySQL</titleabbrev>
|
||||
<partintro>
|
||||
<simpara>
|
||||
|
@ -46,12 +46,12 @@
|
|||
// printing HTML result
|
||||
|
||||
print "<table>\n";
|
||||
while($line = mysql_fetch_array($result)){
|
||||
print "\t<tr>\n";
|
||||
while(list($col_name, $col_value) = each($line)){
|
||||
print "\t\t<td>$col_value</td>\n";
|
||||
}
|
||||
print "\t</tr>\n";
|
||||
while ($line = mysql_fetch_array($result)) {
|
||||
print "\t<tr>\n";
|
||||
while(list($col_name, $col_value) = each($line)) {
|
||||
print "\t\t<td>$col_value</td>\n";
|
||||
}
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
|
@ -155,13 +155,18 @@
|
|||
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.</para>
|
||||
the current connected user stays active.
|
||||
</para>
|
||||
|
||||
<!-- what is returned? bool -> succes/failure i suppose? -->
|
||||
|
||||
<note><para>This function was introduced in PHP 3.0.13 and
|
||||
requires MySQL 3.23.3 or higher.
|
||||
</para></note>
|
||||
<!-- in PHP 3 int and in PHP 4 bool -->
|
||||
|
||||
<note>
|
||||
<para>
|
||||
This function was introduced in PHP 3.0.13 and requires MySQL
|
||||
3.23.3 or higher.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -275,8 +280,8 @@
|
|||
PHP 3.0.10.
|
||||
</para>
|
||||
<para>
|
||||
You can suppress the error message on failure by prepending '@'
|
||||
to the function name.
|
||||
You can suppress the error message on failure by prepending '@'
|
||||
to the function name.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
|
@ -295,17 +300,15 @@
|
|||
<title>MySQL connect example</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
|
||||
$link = mysql_connect ("localhost", "username", "secret")
|
||||
or die ("Could not connect");
|
||||
print ("Connected successfully");
|
||||
mysql_close ($link);
|
||||
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para> See also
|
||||
<function>mysql_pconnect</function>, and
|
||||
<function>mysql_pconnect</function> and
|
||||
<function>mysql_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -385,7 +388,6 @@
|
|||
<para>
|
||||
<parameter>Row_number</parameter> starts at 0.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>MySQL data seek example</title>
|
||||
<programlisting role="php">
|
||||
|
@ -447,14 +449,12 @@
|
|||
<parameter>row</parameter> parameter is an index into the result
|
||||
set.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If an error occurs, &false; is returned. Use
|
||||
<function>mysql_errno</function> and
|
||||
<function>mysql_error</function> to determine the nature of the
|
||||
error.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title><function>mysql_db_name</function> example</title>
|
||||
<programlisting role="php">
|
||||
|
@ -473,12 +473,10 @@ while ($i < $cnt) {
|
|||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
For backward compatibility, <function>mysql_dbname</function> is
|
||||
also accepted. This is deprecated, however.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -565,8 +563,10 @@ while ($i < $cnt) {
|
|||
<refentry id="function.mysql-errno">
|
||||
<refnamediv>
|
||||
<refname>mysql_errno</refname>
|
||||
<refpurpose>Returns the numerical value of the error message from previous
|
||||
MySQL operation</refpurpose>
|
||||
<refpurpose>
|
||||
Returns the numerical value of the error message from previous
|
||||
MySQL operation
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -615,8 +615,10 @@ echo mysql_errno().": ".mysql_error()."<BR>";
|
|||
<refentry id="function.mysql-error">
|
||||
<refnamediv>
|
||||
<refname>mysql_error</refname>
|
||||
<refpurpose>Returns the text of the error message from previous
|
||||
MySQL operation</refpurpose>
|
||||
<refpurpose>
|
||||
Returns the text of the error message from previous MySQL
|
||||
operation
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -682,8 +684,8 @@ echo mysql_errno().": ".mysql_error()."<BR>";
|
|||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
<function>mysql_escape_string</function> does not escape <literal>%</literal>
|
||||
and <literal>_</literal>.
|
||||
<function>mysql_escape_string</function> does not escape
|
||||
<literal>%</literal> and <literal>_</literal>.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
@ -743,7 +745,8 @@ select t1.f1 as foo t2.f1 as bar from t1, t2
|
|||
</para>
|
||||
<para>
|
||||
For further details, see also
|
||||
<function>mysql_fetch_row</function> and <function>mysql_fetch_assoc</function>.
|
||||
<function>mysql_fetch_row</function> and
|
||||
<function>mysql_fetch_assoc</function>.
|
||||
</para>
|
||||
<example>
|
||||
<title><function>mysql_fetch_array</function> example</title>
|
||||
|
@ -783,7 +786,7 @@ mysql_free_result ($result);
|
|||
Returns an associative array that corresponds to the fetched row,
|
||||
or &false; if there are no more rows.</para>
|
||||
<para>
|
||||
<function>mysql_fetch_assoc</function> is equivalent to calling
|
||||
<function>mysql_fetch_assoc</function> is equivalent to calling
|
||||
<function>mysql_fetch_array</function> with MYSQL_ASSOC for the
|
||||
optional second parameter. It only returns an associative array.
|
||||
This is the way <function>mysql_fetch_array</function> originally
|
||||
|
@ -792,9 +795,10 @@ mysql_free_result ($result);
|
|||
</para>
|
||||
<para>
|
||||
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 <function>mysql_fetch_array</function> and
|
||||
have it return the numeric indices as well.
|
||||
the last column will take precedence. To access the other
|
||||
column(s) of the same name, you must use
|
||||
<function>mysql_fetch_array</function> and have it return the
|
||||
numeric indices as well.
|
||||
</para>
|
||||
<para>
|
||||
An important thing to note is that using
|
||||
|
@ -804,7 +808,8 @@ mysql_free_result ($result);
|
|||
</para>
|
||||
<para>
|
||||
For further details, see also
|
||||
<function>mysql_fetch_row</function> and <function>mysql_fetch_array</function>.
|
||||
<function>mysql_fetch_row</function> and
|
||||
<function>mysql_fetch_array</function>.
|
||||
</para>
|
||||
<example>
|
||||
<title><function>mysql_fetch_assoc</function></title>
|
||||
|
@ -823,7 +828,7 @@ mysql_free_result ($result);
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-fetch-field">
|
||||
<refentry id="function.mysql-fetch-field">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_field</refname>
|
||||
<refpurpose>
|
||||
|
@ -1449,7 +1454,7 @@ $link = mysql_connect('localhost', 'myname', 'secret');
|
|||
$db_list = mysql_list_dbs($link);
|
||||
|
||||
while ($row = mysql_fetch_object($db_list)) {
|
||||
echo $row->Database . "\n";
|
||||
echo $row->Database . "\n";
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -1475,7 +1480,9 @@ database3
|
|||
For downward compatibility <function>mysql_listdbs</function> can
|
||||
also be used.
|
||||
</para>
|
||||
<para>See also <function>mysql_db_name</function></para>
|
||||
<para>
|
||||
See also <function>mysql_db_name</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -1526,7 +1533,7 @@ $fields = mysql_list_fields("database1", "table1", $link);
|
|||
$columns = mysql_num_fields($fields);
|
||||
|
||||
for ($i = 0; $i < $columns; $i++) {
|
||||
echo mysql_field_name($fields, $i) . "\n";;
|
||||
echo mysql_field_name($fields, $i) . "\n";;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -1654,7 +1661,7 @@ echo "$num_rows Rows\n";
|
|||
See also:
|
||||
<function>mysql_affected_rows</function>,
|
||||
<function>mysql_connect</function>,
|
||||
<function>mysql_select_db</function> and
|
||||
<function>mysql_select_db</function>, and
|
||||
<function>mysql_query</function>.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -1845,7 +1852,10 @@ $result = mysql_query ("SELECT my_col FROM my_tbl")
|
|||
<refentry id="function.mysql-unbuffered-query">
|
||||
<refnamediv>
|
||||
<refname>mysql_unbuffered_query</refname>
|
||||
<refpurpose>Send an SQL query to MySQL, without fetching and buffering the result rows</refpurpose>
|
||||
<refpurpose>
|
||||
Send an SQL query to MySQL, without fetching and buffering the
|
||||
result rows
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -1856,26 +1866,29 @@ $result = mysql_query ("SELECT my_col FROM my_tbl")
|
|||
<paramdef>resource
|
||||
<parameter><optional>link_identifier</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_unbuffered_query</function> sends a SQL query <parameter>query</parameter> to MySQL,
|
||||
without fetching and buffering the result rows automatically, as
|
||||
<function>mysql_query</function> does.
|
||||
On the one hand, this saves a considerable amount of memory with SQL
|
||||
queries that produce large result sets. On the other hand, you can start
|
||||
working on the result set immediately after the first row has been
|
||||
retrieved: you don't have to wait until the complete SQL query has been
|
||||
performed.
|
||||
When using multiple DB-connects, you have to specify the optional parameter <parameter>link_identifier</parameter>.
|
||||
<function>mysql_unbuffered_query</function> sends a SQL query
|
||||
<parameter>query</parameter> to MySQL, without fetching and
|
||||
buffering the result rows automatically, as
|
||||
<function>mysql_query</function> does. On the one hand, this
|
||||
saves a considerable amount of memory with SQL queries that
|
||||
produce large result sets. On the other hand, you can start
|
||||
working on the result set immediately after the first row has
|
||||
been retrieved: you don't have to wait until the complete SQL
|
||||
query has been performed. When using multiple DB-connects, you
|
||||
have to specify the optional parameter
|
||||
<parameter>link_identifier</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The benefits of <function>mysql_unbuffered_query</function> come at a
|
||||
cost: You cannot use <function>mysql_num_rows</function> on a result set
|
||||
returned from <function>mysql_unbuffered_query</function>. You also have
|
||||
to fetch all result rows from an unbuffered SQL query, before you can
|
||||
send a new SQL query to MySQL.
|
||||
The benefits of <function>mysql_unbuffered_query</function> come
|
||||
at a cost: You cannot use <function>mysql_num_rows</function> on
|
||||
a result set returned from
|
||||
<function>mysql_unbuffered_query</function>. You also have to
|
||||
fetch all result rows from an unbuffered SQL query, before you
|
||||
can send a new SQL query to MySQL.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
|
@ -2027,12 +2040,12 @@ while ($i < mysql_num_rows ($result)) {
|
|||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>mysql_get_client_info</function></funcdef>
|
||||
<void/>
|
||||
<void/>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_get_client_info</function> returns a string that represents
|
||||
the client library version.
|
||||
<function>mysql_get_client_info</function> returns a string that
|
||||
represents the client library version.
|
||||
</para>
|
||||
<para>
|
||||
<function>mysql_get_client_info</function> was added in PHP 4.0.5.
|
||||
|
@ -2050,15 +2063,17 @@ while ($i < mysql_num_rows ($result)) {
|
|||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>mysql_get_host_info</function></funcdef>
|
||||
<paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef>
|
||||
<paramdef>resource
|
||||
<parameter><optional>link_identifier</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_get_host_info</function> returns a string
|
||||
<function>mysql_get_host_info</function> returns a string
|
||||
describing the type of connection in use for the connection
|
||||
<parameter>link_identifier</parameter>, including the server host name.
|
||||
If <parameter>link_identifier</parameter> is omited, the last opened
|
||||
connection will be used.
|
||||
<parameter>link_identifier</parameter>, including the server host
|
||||
name. If <parameter>link_identifier</parameter> is omited, the
|
||||
last opened connection will be used.
|
||||
</para>
|
||||
<para>
|
||||
<function>mysql_get_host_info</function> was added in PHP 4.0.5.
|
||||
|
@ -2076,13 +2091,16 @@ while ($i < mysql_num_rows ($result)) {
|
|||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql_get_proto_info</function></funcdef>
|
||||
<paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef>
|
||||
<paramdef>resource
|
||||
<parameter><optional>link_identifier</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_get_proto_info</function> returns the protocol version
|
||||
used by connection <parameter>link_identifier</parameter>.
|
||||
If <parameter>link_identifier</parameter> is omited, the last opened
|
||||
<function>mysql_get_proto_info</function> returns the protocol
|
||||
version used by connection
|
||||
<parameter>link_identifier</parameter>. If
|
||||
<parameter>link_identifier</parameter> is omited, the last opened
|
||||
connection will be used.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -2101,13 +2119,16 @@ while ($i < mysql_num_rows ($result)) {
|
|||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql_get_server_info</function></funcdef>
|
||||
<paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef>
|
||||
<paramdef>resource
|
||||
<parameter><optional>link_identifier</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_get_server_info</function> returns the server version
|
||||
used by connection <parameter>link_identifier</parameter>.
|
||||
If <parameter>link_identifier</parameter> is omited, the last opened
|
||||
<function>mysql_get_server_info</function> returns the server
|
||||
version used by connection
|
||||
<parameter>link_identifier</parameter>. If
|
||||
<parameter>link_identifier</parameter> is omited, the last opened
|
||||
connection will be used.
|
||||
</para>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue