Forum Moderators: coopster
<pre>
<?php
$rows = mysql_query("SHOW TABLES FROM test");
while ($row = mysql_fetch_assoc($rows)) {
print_r($row);
}
?>
</pre>
So, knowing what is coming back, you design your query ...
<pre>
<?php
$tables = array();
$rows = mysql_query("SHOW TABLES FROM test");
while ($row = mysql_fetch_array($rows)) {
$tables[] = $row[0];
}
print_r($tables);
?>
</pre>
> You can get any data back from a mysql_query you want.