RE: [PHP] Help with showing tables in DB
| From: | Non-HP-Boise,ex1) | Date: | Tue, 26 Feb 2002 21:12:48 +0000 |
| Subject: | RE: [PHP] Help with showing tables in DB | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86312@lists.php.net to get a copy of this message | ||
Hi Ron,
Look at the mysql_list_tables function, it looks like it will provide what
you are are looking for.
http://www.php.net/manual/en/function.mysql-list-tables.php
is the link to
the manual
Jason
-----Original Message-----
From: Ron Clark [mailto:rclark@swbanktx.com]
Sent: Tuesday, February 26, 2002 2:02 PM
To: php-general@lists.php.net
Subject: [PHP] Help with showing tables in DB
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Consider the following:
mysql_select_db($db_name);
$result = mysql_query("show tables");
while ($rows = mysql_fetch_object($result)) {
echo $rows;
}
So why does this not return the Table names? I have even tried "echo
rows->Table" and "echo rows->Tables" to no avail. So how do I fix
this?
Thanks in advance,
Ron C.
-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1
iQA/AwUBPHv32kSpEYIqgLQzEQISfQCeLVinx7oQc4Gmudv1MJbb17dGCPoAnA7S
yRR86rJUwHsXGJlU0yVckVyK
=2bva
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php