SHOW TABLES Help


Posted on 16th Feb 2014 07:03 pm by admin

Hi all

I have the following

Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]<?php
$sql = "SHOW TABLES";
$result = mysql_query($sql);

while ($row = mysql_fetch_row($result)) {
echo "Table: {$row[0]}n
";
}
?>
Which outputs

Code: [Select]Table: admins
Table: users
Table: people
This is great, but I wonder if it's possible to do these 2 things;

1: Rather than displaying the table name such as "admins", it would display the "table comments", so it would look like

Code: [Select]Table: Table of administrators
Table: Table of site users
Table: Table of people
2: Is it possible to tell it to exclude specified tables, such as not displaying the "admins" table? So if I excluded the "admins" table it would finally look like

Code: [Select]Table: Table of site users
Table: Table of people
Any help would be great, been searching Google for ages now with no luck

Thanks
No comments posted yet

Your Answer:

Login to answer
213 Like 24 Dislike
Previous forums Next forums
Other forums

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a dir

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

login box shows up again after logging in 2nd login works
Hello,

I am having trouble on my site Lockerz.rack111.com where when you login the login box

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

cyrillic string conversion question
Hello,

First time here...

I would like to know if there is a way to convert a

Consuming third party Payment Gateway API from Procedure.
Hi All,

First of all i would like to thank all the people of the oracle forum for providi

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash