mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
130 lines
3 KiB
XML
130 lines
3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.11 $ -->
|
|
<refentry xml:id="function.mysql-db-name" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>mysql_db_name</refname>
|
|
<refpurpose>Get result data</refpurpose>
|
|
</refnamediv>
|
|
|
|
<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></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="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:"../../../../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
|
|
-->
|