how to create a new coloumn in database. but before create a new column, the script need to check if the column is already exist or not.
ALTER TABLE view ADD new_01 VARCHAR( 3 ) DEFAULT '0' NOT NULL AFTER prod_id ;
view
new_01
prod_id
to check to see if a field exists run the query: SHOW COLUMNS FROM table or (if using mySQL) run [man]mysql_list_fields[/man] (though this function seems to be deprecated)