Adding fields

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pauls74462
Forum Newbie
Posts: 16
Joined: Tue Jun 10, 2008 8:13 pm

Adding fields

Post by pauls74462 »

How do you add fields after a table has been created in php?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Adding fields

Post by John Cartwright »

Code: Select all

ALTER TABLE `your_table_name` ADD `your_new_column` FIELDTYPE;
Where you would replace, the table name, the column name, and FIELDTYPE appropriatly.
Post Reply