Paulz Posted March 7, 2005 Share Posted March 7, 2005 I had the problem of deleting a large number of discontinued products, as quick and simple as possible. Found this contribution: Delete product with search, http://www.oscommerce.com/community/contri...+product+search It allows a type of wild card search lists all matching products with check boxes enabling multiple deletion. However It only deletes from the products table.. I want it to delete from all the other product tables, one question though will any of the products tables effect the customer account_history_info.php for deleted products? Ive deleted items from the product table and the products_description table and they still appear OK in the customer account_history_info. Cannot find any feedback on this contribution in the forum, has anyone modified it or had any provlems. or could anyone help with modifying. p.s. Another advantage compared with similar contributions is it doesnt effect the categories and you dont have to search through the cats either! Quote Link to comment Share on other sites More sharing options...
Paulz Posted March 7, 2005 Author Share Posted March 7, 2005 Im still unsure on what other product tables to delete the unwanted items from, can anyone help on that. Ive added 'Delete from products_description' to the script, i dont think it looks right but it works ok! Id apreciate if someone could tidy the code. if ($action == "update_prices") { foreach($HTTP_POST_VARS['product_new_price'] as $id => $cancella) { echo "id: $id -> $cancella<br>"; mysql_query("DELETE FROM products WHERE products_id=$id"); mysql_query("DELETE FROM products_description WHERE products_id=$id"); $count++; } 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.