georg           Sun Apr 21 13:18:40 2002 EDT

  Modified files:              
    /phpdoc/en/reference/mysql/functions        mysql-tablename.xml 
  Log:
  fixed sample
  added see also
  
  
Index: phpdoc/en/reference/mysql/functions/mysql-tablename.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.2 
phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.3
--- phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.2 Wed Apr 17 02:41:14 
2002
+++ phpdoc/en/reference/mysql/functions/mysql-tablename.xml     Sun Apr 21 13:18:40 
+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-tablename">
    <refnamediv>
@@ -24,16 +24,21 @@
       <programlisting role="php">
 <![CDATA[
 <?php
-mysql_connect("host");
-$result = mysql_list_tables("kossu");
-for ($i = 0; $i < mysql_num_rows($result); $i++) {
-    $tb_names[$i] = mysql_tablename($result, $i);
-    echo $tb_names[$i] . "<br />";
+    mysql_connect("localhost", "mysql_user", "mysql_password");
+    $result = mysql_list_tables("mydb");
+
+    for ($i = 0; $i < mysql_num_rows($result); $i++) {
+        printf ("Table: %s\n", mysql_tablename($result, $i));
+
+    mysql_free_result($result);
 }
 ?>
 ]]>
       </programlisting>
      </example>
+    </para>
+    <para>
+     See also: <function>mysql_list_tables</function>.
     </para>
    </refsect1>
   </refentry>


Reply via email to