yandoo Posted June 30, 2008 Share Posted June 30, 2008 Hi there, Is there a way to insert multiple records of the same table at the same time???? In my shop each time a customer purchases a type of product a new order is submitted detailing: orderID, productID, CustomerID and Qty. In their cart at the point of purchase they may have more than one type of product and quantiies for each, in the carts. In this situation i think i need to insert an order for each type of product in the same form... Is it possible to do this??? Thanks Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted June 30, 2008 Share Posted June 30, 2008 You can, however it is mysql specific... INSERT INTO tablename (column1, column2) VALUES ('value1', 'value2), ('value3', 'value4'), ('value5', 'value6'); Quote Link to comment Share on other sites More sharing options...
drax Posted June 30, 2008 Share Posted June 30, 2008 So you could have an order that looks like orderId=1bb customerID =Joe1 ProductID = 9af quantity = 2 ProductID = 6az quantity = 1 etc? that would all appear in a single instance of the cart? Quote Link to comment Share on other sites More sharing options...
yandoo Posted June 30, 2008 Author Share Posted June 30, 2008 yes thats right, how can i over come this please?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.