Would would I get the id of a query I just inserted if I am using a auto-increment?
Use the function mysql_insert_id() after having inserted datas in your database.