Hi,
Can you set auto increment in phpmyadmin to be 2? So that it goes 1, 3, 5, 7etc?
Thanks...............
Hi,
Can you set auto increment in phpmyadmin to be 2? So that it goes 1, 3, 5, 7etc?
Thanks...............
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
$id=mysql_insert_id
$newid=$id+2
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!
Thanks for that!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.