Set auto-increment with mysql - innodb [SOLVED]

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Set auto-increment with mysql - innodb [SOLVED]

Post by Stryks »

Hey all,

Just having a problem with a database I'm working with. I used to have a MYISAM database which let me set the auto-increment to whatever I wanted it to be (via phpMyAdmin).

I'm now using innodb tables to allow me to use transactions, but I find that if I set the auto increment value, it just forgets the value and returns to 1 again.

Is there any way I can force it to start from an arbitrary number? Say .. 117340?

Cheers

(mysql 3.23.58 - php 4.3.11)
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

Ah .. you just create a new row with the index manually set.

I was trying this, but I was actually editing a previous row, not creating a new one.

Must remember that.

:D
Post Reply