Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links






 
 

SPONSORS



 
 

Show available tables

This example shows how to display a list of available tables in a database.

Here is the code

<?php
$db = mysql_connect("localhost" , "username" , "password");
mysql_select_db("mysql" , $db);
$result = mysql_query("SHOW tables", $db);
while($row = mysql_fetch_row($result))
{
print("$row[0]<br>");
}
?>

This code will list all the tables in the mysql database .