use time() to generate the current timestamp and set it as an id in the DB... make sure the DB field is a primary key 🙂)
in fact, why will you need to do that, when mysql provides you with the autoincrement facility... just create the tables the following way:
create table ttt(id int NOT NULL auto_increment, valss text, primary key(id))
🙂)