mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

Specific changes: - Upgraded the soft deprecation sidebars to full blown warnings. - Beefed up the wording of the soft deprecation notice boilerplate. - Added changelog items for mysql_connect() and mysql_pconnect(), since they're the functions that have changed behaviour. - Updated the MySQL changelog. - Updated the 5.5 migration guide. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328734 c90b9560-bf6c-de11-be94-00142212c4b1
164 lines
3.8 KiB
XML
164 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.mysql-db-name" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>mysql_db_name</refname>
|
|
<refpurpose>Retrieves database name from the call to <function>mysql_list_dbs</function></refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
<warning>
|
|
&mysql.alternative.note;
|
|
<simplelist role="alternatives">
|
|
<member>Query: <literal>SELECT DATABASE()</literal></member>
|
|
</simplelist>
|
|
</warning>
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mysql_db_name</methodname>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>row</parameter></methodparam>
|
|
<methodparam choice="opt"><type>mixed</type><parameter>field</parameter><initializer>NULL</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Retrieve the database name from a call to
|
|
<function>mysql_list_dbs</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>result</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The result pointer from a call to <function>mysql_list_dbs</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>row</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The index into the result set.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>field</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The field name.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns the database name on success, and &false; on failure. If &false;
|
|
is returned, use <function>mysql_error</function> to determine the nature
|
|
of the error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.5.0</entry>
|
|
<entry>
|
|
The <function>mysql_list_dbs</function> function is deprecated,
|
|
and emits an <constant>E_DEPRECATED</constant> level error.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>mysql_db_name</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
|
|
$link = mysql_connect('dbhost', 'username', 'password');
|
|
$db_list = mysql_list_dbs($link);
|
|
|
|
$i = 0;
|
|
$cnt = mysql_num_rows($db_list);
|
|
while ($i < $cnt) {
|
|
echo mysql_db_name($db_list, $i) . "\n";
|
|
$i++;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
&info.deprecated.alias;
|
|
<function>mysql_dbname</function>
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>mysql_list_dbs</function></member>
|
|
<member><function>mysql_tablename</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|