Thanks for the reply!
Please see my pseudo code below. @@@ mark is the place where my
questions come from. I wonder if it is doable in MySQL.

I wish to have code like this: (@@@ is where my questions come from)
// connect to the DB

// list all table names in the dtabase 
print "<tr><td bgcolor=#1A4D80 align=center>$table
Table</font></td></tr>";

//@@@@
$query_all_tables = "select name from all_tables ='$table'";
$result_table_names = mysql_query($query_all_tables) or die("no tables
were ever defined\n");
$row_table_name = mysql_fetch_array($result_table_names);
$table_in_db = $row_table_name["Tables in the DB"];
...
// once a table is selected, let's try to get all fields information in
this table
//@@@
$query_all_fields - "select column_name from all_columns where
table_name ='$selected_table'";
$result_field_names = mysql_quert($query_all_fields) or die("no
fields?\n");
$row_field_name = mysql_fetch_array($result_field_names);
$field_in_table = $row_field_name["Fields in the Table"];






> -----Original Message-----
> From: Mark Matthews [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 8:20 AM
> To: Karen Chu
> Cc: 'gerald_clark'; [EMAIL PROTECTED]
> Subject: Re: How to get meta data info in MySQL
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Karen Chu wrote:
> 
> > I wish to have something like 'select name from all_tables' in
oracle or
> > 'select name from sysobjects' in Sybase. Oracle has 'show tables' or
> > 'describe <table>' too, but actual meta data is *stored* in systems
> > tables. I wonder if MySQL also stores these in system tables or
files or
> > somewhere else.
> 
> MySQL does not currently store this information in system tables.
'SHOW'
> / 'DESCRIBE' are treated as queries by MySQL (just a special case of a
> query), so I'm still confused as why they won't work for you. Is there
a
> reason that you _have_ to use system tables for this functionality?
> 
>       -Mark
> 
> - --
> For technical support contracts, visit
https://order.mysql.com/?ref=mmma
> 
>     __  ___     ___ ____  __
>    /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
>   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
>  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
>         <___/ www.mysql.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQE+5KWHtvXNTca6JD8RAoI2AKDJoYzsvK2UEnA98ttB7wCm6GxOcwCgot7g
> IN4IyjvSI6aApNvx9tEYvHE=
> =VPrD
> -----END PGP SIGNATURE-----
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to