Jump to content

auto add a column to mysql


searls03

Recommended Posts

Is there a way to use php to make an automatic column addition to a table?  like if I had a comment form and want to save the replys in a database, I would want a column for each reply, is there a way to make a new column each time someone submits the form?

Let's back up.  I don't think you want to create a new column every time someone makes a reply.  Your tables should be relational, meaning, you can relate each table in such a way to extract the specific information needed.

well I have never made tables relationly, how would i do that?

Google and read some articles:

http://www.mikebernat.com/blog/Setting-Up_a_Relational_Database_in_MySQL

http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html

 

is there a way you can auto add a column?

Yes, but I already told you, I don't think you want to do that.

 

Have a table with replies that links each reply to each article/form/blog w/e it is.

Archived

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

×
×
  • Create New...

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.