I have a table database where i store some userids and productids. Every time i insert i need to add userid in a field, productid in the other field and go insert. Doing this in the table it will create a row/separate rows with the data i insert. Is it possible to insert multiple productids for the same userids at the same time creating multiple rows in the table for the same userid? I add userid in the field, then i add productid1;productid2;productid3 in the other field and on the table upon insert to create multiple rows with the same userid(i used) for the different productids ? Sorry if i can't explain it better... Thank you.
Are you trying to work out how to build a form to capture the info or how to write the insert statements?
I am trying to insert multiple statements at the same time for the same userid, but to be inserted on different rows in the table, not the same row
You either need to insert them manually one at a time or write a program/function to insert them automatically one at a time.
Try this: insert into table (id, userID, productID) values ('', '123', '111'), ('', '123', '222'), ('', '123', '333'), and so on... userid=123 is the same for each entry, productID changes for each row. I hope I understood your question properly...