Reaper0167 Posted June 19, 2009 Share Posted June 19, 2009 I'm stuck in a rut. I have a table in mySql. I'm looking to click on a button on my page, and have whatever name is on that page get added to a new column in mySql. I would like to have the columns named. Name1, Name2, Name3, and so on. Creating new columns in mySql with PHP is no problem when I put the column name in the sql statement. What is the trick to have PHP check to see what column names are already there(Name1, Name2), and then add then next one(Name3)? So the columns need to created in the script while adding the name that is displayed on the page. Any input would be appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/162855-use-php-to-add-mysql-columns/ Share on other sites More sharing options...
Ken2k7 Posted June 19, 2009 Share Posted June 19, 2009 Wow! DB normalization much? Link to comment https://forums.phpfreaks.com/topic/162855-use-php-to-add-mysql-columns/#findComment-859345 Share on other sites More sharing options...
Reaper0167 Posted June 19, 2009 Author Share Posted June 19, 2009 Well, still learning PHP. I will keep looking around. Link to comment https://forums.phpfreaks.com/topic/162855-use-php-to-add-mysql-columns/#findComment-859362 Share on other sites More sharing options...
xtopolis Posted June 19, 2009 Share Posted June 19, 2009 Look around here http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Link to comment https://forums.phpfreaks.com/topic/162855-use-php-to-add-mysql-columns/#findComment-859370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.