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

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

Need help in Generating Combinations
Need help generating all possible combination of names in an array

Lets say i have the follow

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

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