You should to add field from AUTO_INCROMENT parameter to table of database. It will be to contain auto-number of position of table, automatically created and enlarged at every addition new element of table of database.
For example :
mysql_query("CREATE TABLE IF NOT EXISTS table_name(Idk INT NOT NULL AUTO_INCREMENT,Kategory CHAR(20) NOT,Name CHAR(20) NOT NULL, NULL,Last_in DATETIME NOT NULL,Number MEDIUMINT DEFAULT '0' NOT NULL,Info CHAR(30) DEFAULT '' NULL, PRIMARY KEY (Idk))");
Field 'Idk' contains number 1, 2, 3 etc..
At read database you should to add text 'TE' to number and you will receive 'TE1', 'TE2', 'TE3' etc. .