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

upload form file types....
Hey all, I am learning PHP and I am writing a script from the W3C Schools tutorials for uploading fi

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page.

What is ha

Select all entries from database that include a phrase
I have a database of clubs - one of the categories is meeting time and place
I would like to have

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

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