cvs: phpdoc /en/reference/mysql/functions mysql-list-tables.xml

From: Date: Sun, 21 Apr 2002 15:18:45 +0000
Subject: cvs: phpdoc /en/reference/mysql/functions mysql-list-tables.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969344675@lists.php.net to get a copy of this message
georg Sun Apr 21 11:18:45 2002 EDT Modified files: /phpdoc/en/reference/mysql/functions mysql-list-tables.xml Log: inserted new sample inserted see also Index: phpdoc/en/reference/mysql/functions/mysql-list-tables.xml diff -u phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.2 phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.3 --- phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.2 Wed Apr 17 02:41:12 2002 +++ phpdoc/en/reference/mysql/functions/mysql-list-tables.xml Sun Apr 21 11:18:45 2002 @@ -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. @@ -26,6 +26,29 @@ <para> 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>

« previous php.doc (#969344675) next »