mysql how to add an Id column using auto increment

alter table tablename add column id int auto_increment primary key;

uppercase first character of every word in string

php string function
ucwords();

How to uppercase first letter in each word

php function  ucfirst();