View Full Version : How do auto increment fields get updated?
missing-score
04-08-2003, 11:39 PM
I need to use an auto increment field, but I dont know how they get updated in a query.
If I had say:
INSERT INTO `table` VALUES ( '1','2','3' )
and the 3 row was auto increment, would i put a number, or just put nothing.
Help appreciated :D .
Nightfire
04-09-2003, 12:12 AM
I never put anything, as it updates on it's own :) No idea if it's the right way, but I think it's best to let mysql do the counting, atleast you know it'll be right :p
missing-score
04-09-2003, 12:16 AM
Just say 2 was the auto increment. How does that handle
( or do you mean you just put an open and close quote '' ) ?
Spookster
04-09-2003, 12:28 AM
Originally posted by missing-score
Just say 2 was the auto increment. How does that handle
( or do you mean you just put an open and close quote '' ) ?
Just omit that field. The database knows to put a value in that field.
missing-score
04-09-2003, 12:33 AM
Thanks spooks, It works now.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.