mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Documented mysql(), mysql_db_name(), and mysql_dbname().
Fixed a typo. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32501 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6d3f2a5014
commit
7fdd4c38f5
1 changed files with 108 additions and 1 deletions
|
@ -27,6 +27,32 @@
|
|||
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.mysql">
|
||||
<refnamediv>
|
||||
<refname>mysql</refname>
|
||||
<refpurpose>Send a MySQL query</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql</function></funcdef>
|
||||
<paramdef>string <parameter>database</parameter></paramdef>
|
||||
<paramdef>string <parameter>query</parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter>
|
||||
<optional>link_identifier</optional>
|
||||
</parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql</function> is an alias for
|
||||
<function>mysql_db_query</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-affected-rows">
|
||||
<refnamediv>
|
||||
<refname>mysql_affected_rows</refname>
|
||||
|
@ -355,6 +381,87 @@
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-dbname">
|
||||
<refnamediv>
|
||||
<refname>mysql_dbname</refname>
|
||||
<refpurpose>Get result data</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql_dbname</function></funcdef>
|
||||
<paramdef>int <parameter>result</parameter></paramdef>
|
||||
<paramdef>int <parameter>row</parameter></paramdef>
|
||||
<paramdef>mixed
|
||||
<parameter>
|
||||
<optional>field</optional>
|
||||
</parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_dbname</function> is an alias for
|
||||
<function>mysql_db_name</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-db-name">
|
||||
<refnamediv>
|
||||
<refname>mysql_db_name</refname>
|
||||
<refpurpose>Get result data</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql_db_name</function></funcdef>
|
||||
<paramdef>int <parameter>result</parameter></paramdef>
|
||||
<paramdef>int <parameter>row</parameter></paramdef>
|
||||
<paramdef>mixed
|
||||
<parameter>
|
||||
<optional>field</optional>
|
||||
</parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_db_name</function> takes as its first parameter
|
||||
the result pointer from a call to
|
||||
<function>mysql_list_dbs</function>. The
|
||||
<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">
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
mysql_connect('dbhost', 'username', 'password');
|
||||
$db_list = mysql_list_dbs();
|
||||
|
||||
$i = 0;
|
||||
$cnt = mysql_numrows($db_list);
|
||||
while ($i < $cnt) {
|
||||
echo mysql_db_name($db_list, $i) . "\n";
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-db-query">
|
||||
<refnamediv>
|
||||
<refname>mysql_db_query</refname>
|
||||
|
@ -1603,7 +1710,7 @@ $result = mysql_query ("SELECT my_col FROM my_tbl")
|
|||
specifying a fieldname or tablename.fieldname argument.
|
||||
</para>
|
||||
<para>
|
||||
Calls <function>mysql_result</function> should not be mixed
|
||||
Calls to <function>mysql_result</function> should not be mixed
|
||||
with calls to other functions that deal with the result set.
|
||||
</para>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue