I\'m trying to create a table in my sql using PHP but I\'m not sure how to set an initial value for the auto increment field.
This is what i have so far:
If you don't have the auto-increment column in the table yet:
$sql = "ALTER TABLE MY_TABLE ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD INDEX (id);";
Then to set the auto-increment starting value:
$sql = "ALTER TABLE MY_TABLE AUTO_INCREMENT = 111111;";
Potential duplicate of this post.