Post by PalMultimedia » Thu May 09, 2013 3:56 pm

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.

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by Avvici » Thu May 09, 2013 4:16 pm

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;

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by PalMultimedia » Thu May 09, 2013 4:56 pm

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;
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.

Also above mentioned code is not working for me.

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by rph » Thu May 09, 2013 4:58 pm

It means you previously inserted a product then deleted it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by PalMultimedia » Thu May 09, 2013 5:12 pm

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.

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by Avvici » Thu May 09, 2013 7:37 pm

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.
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.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by PalMultimedia » Thu May 09, 2013 8:14 pm

avvici wrote:
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.
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.
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?

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by rph » Fri May 10, 2013 6:03 am

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


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by PalMultimedia » Fri May 10, 2013 3:58 pm

Thanks all.

I have noticed that in my DB auto_increment_increment value set to 2. Any one know how to change to 1?

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by rph » Fri May 10, 2013 6:35 pm

Talk to your host.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by PalMultimedia » Fri May 10, 2013 6:59 pm

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?

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by Avvici » Fri May 10, 2013 8:14 pm

Contact me on skype at involution.media

I will take a look at it for you but I need phpmyadmin acess as well as FTP access. Just be prepared to offer up these things otherwise forget it.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by rph » Fri May 10, 2013 11:28 pm

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?
Sounds like their tech support has no clue. This is likely a global server setting they'll have to change.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: Amazon [Bot], jp1077 and 75 guests