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

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

Sendmail.php - heading error following check_input
Hi,

I would greatly appreciate some help? I am brand new to PHP and have been searching and e

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Extract specific information from a PHP Multidimensional Array
Howdy! I've racked my brain over this for 24 hours now. I think it's time I asked for help. I'm lear

Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work.

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