OriginalSunny Posted February 26, 2006 Share Posted February 26, 2006 Hi,I have created a number of tables and populated the majority of them. There are however some tables i have not populated with data. I can check what fields are in the populated tables using the command:select * from [i]tablename[/i];However if i do this in an empty tables it obviously says "empty set". How do i find out what fields i have created in the table?? Thanks. Link to comment https://forums.phpfreaks.com/topic/3639-checking-what-fields-are-in-an-empty-table/ Share on other sites More sharing options...
shoz Posted February 26, 2006 Share Posted February 26, 2006 [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--]SHOW COLUMNS [color=green]FROM[/color] [color=orange]tablename[/color] [!--sql2--][/div][!--sql3--][code]while ($row = ){ echo $row['Field'];}[/code] Link to comment https://forums.phpfreaks.com/topic/3639-checking-what-fields-are-in-an-empty-table/#findComment-12647 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.