[Phpsig] SHOW TABLES using php?

Wesley Leonard phpsig@kalamazoolinux.org
13 Sep 2002 17:25:22 -0400


http://www.php.net/manual/en/function.mysql-list-tables.php

php.net is the best resource I have found for php so far!

good luck

On Fri, 2002-09-13 at 17:17, Paul VandenBosch wrote:
> How would you write a script to show the tables in a database using php?
> 
> I think I have been able to connect to mysql without an error, now I would
> like to find out which tables are in my database.
> How would you do a mysql> SHOW TABLES; command using php?
> 
> <?php
> include("common.php");
> 
> //set up SQL connection
> 	$connection = mysql_connect($server, $user, $password);
> 
> 	mysql_select_db($db, $connection)
> 
> //insert script
> 
> 
> 
> //end script
> 
> 	mysql_close($connection);
> ?>
> 
> 
> 
> -- 
> Paul VandenBosch
> Guide to Sailing and Cruising Stories
> http://cruisenews.net
> 
> 
> _______________________________________________
> Phpsig mailing list
> Phpsig@kalamazoolinux.org
> http://www.kalamazoolinux.org/mailman/listinfo/phpsig
-- 
Wesley Leonard

marshall@pacdemon.org                   http://pacdemon.org
marshall@westmichigancomputing.com      http://westmichigancomputing.com

"Rather than form a federation with Microsoft and work with what we had
already created, there was this notion that the world should be offered
an alternative." 
    -- Craig Mundie, CTO of Microsoft Corporation