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. Quote 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] Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.