note 48625 deleted from function.msql-tablename by didou
| From: | didou@php.net | Date: | Mon, 04 Apr 2005 22:08:24 +0000 |
| Subject: | note 48625 deleted from function.msql-tablename by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87461@lists.php.net to get a copy of this message | ||
Note Submitter: Gabriel gabx300 at msn dot com
----
here is a code Example for this Function:
// assuming that you have typed the connection string to your server
<?php
$DB = mysql_select_db("DatabaseName", "$conn");
$result = mysql_list_tables ($DB);
?>
<table border='1'>
<tr><td>Tables in database</td></tr>
<?php
$i = 0;
while ($i < mysql_num_rows($result)) {
$table_names[$i] = mysql_tablenames($result, $i);
?>
<tr><td><?php echo $table_names[$i];?> </td></tr>
<?php $i++ ?>
</table>