Site Cloner PHP Script
Bargain Hunter PHP Script
Job Hunter PHP Script
Site Login and Access Control PHP Script

MYSQL Add a Unique Column

The code below creates a new column called username to the table called mytable. The username must be unique. In other words, if you use an insert statement and a username already exists, the data will no be duplicated.

alter table mytable add unique (username);
ALTER TABLE `mytable` ADD UNIQUE (`username`)”;