with what did you create the new table- by hand or using Navicat/HeidiSQL? (I would suggest doing so if you're not very familiar with SQL in general)
I use HeidiSQL and it's pretty simple to use, surprisingly fast,.. and free!
- When you create your table, create the first column in the "Basic" tab and call it "id".
- Give it a data type of "INT".
- Under the "Default" column, select "AUTO_INCREMENT".
- Then click on the "Indexes" tab, click on your id field, then click on "Add". An index called "Index1" will appear.
- Click on the "type/length" entry for Index1 (which probably says "PRIMARY"), select "PRIMARY".
- Then click "save" at the bottom
Manually you can do this when creating (just copy/pasting a table I created):-
Code:
CREATE TABLE IF NOT EXISTS `zone_drops` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`zone_id` int(11) NOT NULL,
`zone_name` varchar(50) NOT NULL,
`item_id` int(11) NOT NULL,
`item_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
If you use Navicat or other, there will be a way to set the default value to AUTO_INCREMENT, and also to make it the primary key. That way your ID will always be unique and auto-generated.