djmatrix Posted July 30, 2008 Posted July 30, 2008 Hello everybody... I have over 10,000 products on the store that i have been working on and need help with a SQL that will update all the products with the 1 Product Attribute.. Below is the SQL for 1 product which is 4854... which has two options..... but i am wanting a SQL that i can run to update all 10,000 products in 1 go. INSERT INTO `products_attributes` (`products_attributes_id`, `products_id`, `options_id`, `options_values_id`, `options_values_price`, `price_prefix`) VALUES (1, 4854, 1, 1, '0.0000', ''), (2, 4854, 1, 2, '4.0000', '+'); I have searched the forum and contributions high and low and cannot find anything that will do this... Please note that i do not use the admin to add products to the site... i use a database that uses easy populate specifically designed to run the website and do all accounts and invoicing... Thanks in advance for any help.... I am totally lost when it comes to SQL...
djmatrix Posted August 2, 2008 Author Posted August 2, 2008 Anybody have any ideas on this at all... :blink: :blink: :blink: <_<
♥geoffreywalton Posted August 3, 2008 Posted August 3, 2008 Why reinvent the wheel? If you are already using EP why not create an input file in EP format and use that? Alternatively hack the code contained in EP. INSERT INTO `products_attributes` (`products_attributes_id`, `products_id`, `options_id`, `options_values_id`, `options_values_price`, `price_prefix`) VALUES (1, 4854, 1, 1, '0.0000', ''), (2, 4854, 1, 2, '4.0000', '+'), (1, 4855, 1, 1, '0.0000', ''), (2, 4856, 1, 2, '4.0000', '+'), (1, 4857, 1, 1, '0.0000', ''); www.w3schools.com You might also want ot look at on duplicate key. google mysql insert (2, 4854, 1, 2, '4.0000', '+') Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.