mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
inserted new sample
inserted see also git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@79311 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1612981e18
commit
e551e7bc3f
1 changed files with 25 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mysql-list-tables">
|
||||
<refnamediv>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<para>
|
||||
<function>mysql_list_tables</function> takes a database name and
|
||||
returns a result pointer much like the
|
||||
<function>mysql_db_query</function> function. You can use the
|
||||
<function>mysql_query</function> function. You can use the
|
||||
<function>mysql_tablename</function> function to extract the
|
||||
actual table names from the result pointer, or any other result
|
||||
table function.
|
||||
|
@ -27,6 +27,29 @@
|
|||
For downward compatibility <function>mysql_listtables</function>
|
||||
can also be used. This is deprecated however.
|
||||
</para>
|
||||
<example>
|
||||
<title>mysql_list_tables Example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
mysql_connect("localhost", "mysql_user", "mysql_password") or
|
||||
die("could not connect");
|
||||
mysql_select_db("mydb");
|
||||
|
||||
$result = mysql_list_tables();
|
||||
|
||||
while (($row = mysql_fetch_row($result))
|
||||
printf ("Table: %s\n", $row[0]);
|
||||
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
See also: <function>mysql_list_dbs</function>,
|
||||
<function>mysql_tablename</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue