New DB Columns

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

New DB Columns

Post by Joe »

Is there any way to create a new table column using PHP. For example if a new product 'carrots' was added through the admistration panel and the column never existed in the database table then is there anyway to create it.

Any help appreciated

Regards


Joe 8)
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i think it would be better to rethink your database design then add columns. HAve a table called "products" and add new products there?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I think you may just be right there magicrobotmonkey. I had an idea which was similar to yours and im going to try it out. Thanks alot!
Post Reply