Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count coloumns

Status
Not open for further replies.

taffelman

Programmer
Nov 22, 2002
3
NO
Hi

Is there an easy way to count how many coloumns a spesific table contains, and then also extract rhe coloumn headlines.

I need this to make a perl script wich automatic generates a HTML table based on the content of a MySql table.

TaffelMan
 
Following command

show columns from table_name;

or

show fields from table_name;


do list all fileds in a table and give you the field count at the end.

I hope it helps


Bye



Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
The following command

show columns from table_name;

or

show fields from table_name;


do list all fileds in a table and give you the field count at the end.

I hope it helps


Bye



Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top