SHOW TABLES Help


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

Hi all

I have the following

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

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

Sql and php order list script problems
Hi im having a few problems with trying to get the coding right on a orders list ive done (or trying

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

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