I need to know on how to display on a page the column names of a table . By using Show is there a way to read that info and then to to display that info again? Or in a separate table can i store these info & the display these values?
I tested it but it is not working -
Any help would be appreciatedCode:$result = mysql_query ("show columns from industries"); print ("<table>"); if ($row = mysql_fetch_array($result)) { do { print ("<tr><td bgcolor=#cccccc>"); print $row["field"]; print ("</td><td bgcolor=#cccc00>"); print $row["type"]; print ("</td><td bgcolor=#cccc00>"); print $row["null"]; print ("</tr>"); } while($row = mysql_fetch_array($result)); } else {print "Sorry, no records were found!";} print ("</table>");


Reply With Quote

Bookmarks