Jump to content

Archived

This topic is now archived and is closed to further replies.

OriginalSunny

Checking what fields are in an empty table

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[!--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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.