Entry
Can PHP automatically update auto incremented numbers in MYSQL?
Nov 17th, 2002 00:05
Mariusz Stankiewicz, Shane Burdan,
My MySQL is a little rusty but if you had a table as such:
create table testtable(
myidfield int auto_increment,
mydata varchar
);
you insert data into the table as such:
INSERT INTO testtable (mydata)
VALUES ('foobar');
notice that the myidfield is not used in the above insert statement.
This tells mysql and most other databases with a autonumber/default
value to increment that field automatically, or leave that value as the
default.
cheers,
Mariusz
http://foa.homeunix.net
mariusz(at)foa.homeunix.net