Can you set auto increment in phpmyadmin to be 2? So that it goes 1, 3, 5, 7etc?


Not that I have tried but it seems possible that you can modify the auto-increment number

Have a look at this website Click Here

Alternatively, you could code the logic manually by increasing the id by one. For example, you're storing a first userID which normally starts as zero then increment it by one and finally store it in your table.

I hope this helps..

As far as I can see from the latest version of phpmyadmin, the operations panel, mentioned in the post referred to, only alters the start no. of the AI.
You could do something like

 query=insert newid,etc

if you follow.

I just came accross this whilst looking for something else.
If I log into the database server on my free server (I use byethost) or locally on my dev copy, and click on the root link at the top, there's a tab labeled 'variables' And the first line is......(drum roll!)
'auto increment increment' just what you are looking for methinks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.