Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto_incrementing by 4!

Status
Not open for further replies.

JoSno

Programmer
Apr 11, 2003
45
GB
Hello!

I wonder if anyone can tell me why when I enter data into a table using the autoincrement facility, the key is going up by four each time!

Strange!

Jo
 
well i have about seven columns with, say, column 1 on auto_increment. I'm then saying INSERT INTO table (col2, col3, col4...) VALUES (val2, val3, val4...); Notice I'm not putting anything in for the auto_increment column but it's values are 1, 5, 9...

Hope this helps

Jo
 
I'm sorry I wasn't clear.

This is by hand in management software or from some program? I had a similar problem once (only by two's, though) in which my PHP code had a logic bug and was inserting the data twice each time.

Want the best answers? Ask the best questions: TANSTAAFL!
 
Oh I see, no this is through the C API and there is only one item being entered each time.

I am confised cos I've spoken to another guy here who says he's had the same thign on his software and he doesn't know why! he also said that his fluctuates on the same data set between incrementing in 1's and 4's!

Excellent!
Jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top