tfburges Posted July 10, 2008 Share Posted July 10, 2008 What's the best way to do this? I've tried a few different things and I can't seem to get it to work. I've done this before. And I'm even using code from another page I created of which I know works. I hate it when simple things like this don't work right because I end up spending hours trying to figure it out because it should be so simple. I seem to be better at getting the hard stuff to work. Link to comment https://forums.phpfreaks.com/topic/114170-populating-a-single-column-with-all-column-names-from-another-table/ Share on other sites More sharing options...
lvtrii Posted July 10, 2008 Share Posted July 10, 2008 $res = mysql_query("DESCRIBE table"); while ($row = mysql_fetch_assoc($res)){ $fields[] = $row['Field']; // Do whatever here.. I'm just sticking the name in an array } Link to comment https://forums.phpfreaks.com/topic/114170-populating-a-single-column-with-all-column-names-from-another-table/#findComment-587040 Share on other sites More sharing options...
tfburges Posted July 10, 2008 Author Share Posted July 10, 2008 That's actually what I was already using. I figured out a better way to do what I was trying to do though. I didn't even need to copy the column names over. Thanks for the quick response btw! Link to comment https://forums.phpfreaks.com/topic/114170-populating-a-single-column-with-all-column-names-from-another-table/#findComment-587045 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.