skidmark10 Posted August 23, 2011 Share Posted August 23, 2011 Hello, Does anyone know the php code to display mysql table names? Link to comment https://forums.phpfreaks.com/topic/245464-how-to-display-column-names-in-a-mysql-table-using-php/ Share on other sites More sharing options...
ebmigue Posted August 23, 2011 Share Posted August 23, 2011 You can query the INFORMATION_SCHEMA database, much like how you would query your own database. Google "information_schema mysql". Hope it helps. Link to comment https://forums.phpfreaks.com/topic/245464-how-to-display-column-names-in-a-mysql-table-using-php/#findComment-1260746 Share on other sites More sharing options...
The Little Guy Posted August 24, 2011 Share Posted August 24, 2011 This will display each table on the page: $sql = mysql_query("show tables"); while($row = mysql_fetch_array($sql)){ echo $row[0]."<br>"; } Link to comment https://forums.phpfreaks.com/topic/245464-how-to-display-column-names-in-a-mysql-table-using-php/#findComment-1261557 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.