i have created an online application for school which is a bite off of ebay. i have created a sql table for each item (art, autos, clothes,etc...) and i have the username as a cookie to keep the session state, i also have the username in every table as a primary key so the problem is when the user enters info into the html page to sell an item that data goes into the db through an insert statement. so if they want to sell another item it displays an error message saying duplicate entry cause its putting the same username into the next row.
I really need to keep the username in there too. this is my version of sql(mysql Ver 14.3 Distrib 4.1.1-alpha, for sun-solaris2.8). i just want to be able to put in multiple entries.
+-------------+--------------+------+-----+---------+----------------+
¦ Field ¦ Type ¦ Null ¦ Key ¦ Default ¦ Extra ¦
+-------------+--------------+------+-----+---------+----------------+
¦ uname ¦ varchar(30) ¦ ¦ PRI ¦ ¦ ¦
¦ category ¦ varchar(30) ¦ YES ¦ ¦ NULL ¦ ¦
¦ name ¦ varchar(40) ¦ YES ¦ ¦ NULL ¦ ¦
¦ price ¦ varchar(25) ¦ YES ¦ ¦ NULL ¦ ¦
¦ brand ¦ varchar(25) ¦ YES ¦ ¦ NULL ¦ ¦
¦ location ¦ varchar(40) ¦ YES ¦ ¦ NULL ¦ ¦
¦ description ¦ varchar(250) ¦ YES ¦ ¦ NULL ¦ ¦
¦ PIC_URL1 ¦ varchar(200) ¦ YES ¦ ¦ NULL ¦ ¦
¦ itemid ¦ int(11) ¦ ¦ MUL ¦ NULL ¦ auto_increment ¦
+-------------+--------------+------+-----+---------+----------------+