I have a table in my mysql database with the following structure:
================================================
CREATE TABLE wie (
id int(10) NOT NULL auto_increment,
user varchar(20) NOT NULL default '',
PRIMARY KEY (id),
KEY user (user)
) TYPE=MyISAM;
Selecting, deleting and inserting data are no problem. But i discovered something strange:
When i delete a row from this table, the row is removed. After some time i insert a new row, but this row does not get the id from the just deleted row. The sql queries are:
"delete from wie where id='$id'"
and
"insert into wie (user) values ('$user')"
I did expect that the new inserted row would take the id from the deleted row.
What am i'm doing wrong? Is it maybe possible to reset the number of "id" to zero again, cause it increases with every insert.
Best regards,
Twan