Get all tables in a database : Table Database « MySQL Database « PHP






Get all tables in a database

<?php

   mysql_connect("mysql153.secureserver.net","java2s","password");

   $tables = mysql_list_tables("java2s");
   $count = 0;

   while ($count < mysql_numrows($tables)) {
      echo mysql_tablename($tables,$count)."<br />";
      $count++;
   }

?>


           
       








Related examples in the same category

1.Listing Tables in a Database