Hi,
This is probably dead simple but I'm stuck!
I have a table with 126 rows in it. The guy that originally created the table didn't think to make the id column an auto incremented one.
For the PHP script I am writing I could really do with making the id column auto increment.
I've tried
But that throws a duplicate entry error.
Basically I want to convert product_id column to auto increment starting from 127 and keep the first 126 in there with the id numbers they already have.
<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
This is probably dead simple but I'm stuck!
I have a table with 126 rows in it. The guy that originally created the table didn't think to make the id column an auto incremented one.
For the PHP script I am writing I could really do with making the id column auto increment.
I've tried
Code:
ALTER TABLE products CHANGE product_id product_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT
But that throws a duplicate entry error.
Basically I want to convert product_id column to auto increment starting from 127 and keep the first 126 in there with the id numbers they already have.
<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2