Jump to content

Listing Table Names.. Please Help


eugene2009

Recommended Posts

Hey, is it possible to list all the table names in a database on an html page?

 

For example:

 

Database Name: Cars

 

Table Names:

 

-BMW

-Mercedes

-Volkswagen

-Ford

-Volvo

 

How do I have it generate that list automatically if I add new tables later on?

Link to comment
Share on other sites

For example:

 

Database Name: Cars

 

Table Names:

 

-BMW

-Mercedes

-Volkswagen

-Ford

-Volvo

 

In my post to provide the answer, I neglected to say: "This does NOT look like a good design."  However, without knowing why it was designed that way, or if, in fact, this was just an example pulled from the air, to explain the question, I did not condemn it immediately.

 

@eugene2009

If this is the design of your database, you may need to re-think it.  If you'd like us to review the design and provide insight, you may want to start a new topic.  If you are working on an admin-type page to let you review databases, tables, and data (as I have done on occasion), you might want to look at the SHOW and DESCRIBE commands of mySql.  They can provide much information about the database and it's contents.

 

Good Luck!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.