I couldn't find about this. Anyone tell me how to change product id from ODD numbers to ALL numbers???
When I add new product it take ODD number every time!!
Thanks in advance.
The index of product table is set to auto increment. It's not odd or even...it's whatever is next in the system. Could be 2, could be 70. If you want to start the numbering over then run this:
Code: Select all
ALTER TABLE prefix_table AUTO_INCREMENT = 0;
You are right. But I think nothing wrong with DB, I can see in structure page in database there is a raw statistics table and in this table my next Autoindex is 530(I have 529 product on website(all id is in ODD number) but when I try to add new product on my website it stored as 531 instead of 530.avvici wrote:The index of product table is set to auto increment. It's not odd or even...it's whatever is next in the system. Could be 2, could be 70. If you want to start the numbering over then run this:
Code: Select all
ALTER TABLE prefix_table AUTO_INCREMENT = 0;
Also above mentioned code is not working for me.
Well it should be start from where I left. I can see on my desktop where I installed demo OC and is working perfect even I deleted few products it resume next from last inserted.
Impossible. Like RPH said, the mysql auto increment doesn't care about that. If you delete a product that has id of 5 and are on auto increment 20, you won't have that id of 5 again. It will go to 21.PalMultimedia wrote:Well it should be start from where I left. I can see on my desktop where I installed demo OC and is working perfect even I deleted few products it resume next from last inserted.
Thanks, I understand, but my problem is after resuming (from 21) my product id continue to take only odd numbers(like 21, 23 ,25..) Why it skin even number? As I said in Database table it mentioned next autoincrement number correctly, them why when I add new product it only take odd product id?avvici wrote:Impossible. Like RPH said, the mysql auto increment doesn't care about that. If you delete a product that has id of 5 and are on auto increment 20, you won't have that id of 5 again. It will go to 21.PalMultimedia wrote:Well it should be start from where I left. I can see on my desktop where I installed demo OC and is working perfect even I deleted few products it resume next from last inserted.
Did you actually check the database to confirm? The other option is you have some screwy mod that's inserting then deleting a ghost product or your host has modified the auto_increment_offset MySQL global for reasons no mere mortal could understand.
-Ryan
Thanks all.
I have noticed that in my DB auto_increment_increment value set to 2. Any one know how to change to 1?
I have noticed that in my DB auto_increment_increment value set to 2. Any one know how to change to 1?
I am stuck,,, I talk to my host provider(namesco) and they says they do not support database quires!!!
I tried SET @@auto_increment_increment=1 to change it but not working.
Anyone have any idea about it?
I tried SET @@auto_increment_increment=1 to change it but not working.
Anyone have any idea about it?
Sounds like their tech support has no clue. This is likely a global server setting they'll have to change.PalMultimedia wrote:I am stuck,,, I talk to my host provider(namesco) and they says they do not support database quires!!!
I tried SET @@auto_increment_increment=1 to change it but not working.
Anyone have any idea about it?
-Ryan
Who is online
Users browsing this forum: No registered users and 79 guests