lindsayanng Posted March 22, 2010 Share Posted March 22, 2010 So i cleared the contents of the products table using php myadmin because I hate having those base products in there floating around. I just opened the products table and emptied the contents, I have done this before. HOWEVER, this time maybe I clearled the WRONG one, or I did something really bad. When I go to add a product or a category I get the error: 1062 - Duplicate entry '10-1' for key 1 insert into categories_description (categories_name, categories_id, language_id) values ('Category Name', '10', '1') But when I click the back button the product or category is there with the image that I added, BUT (now heres the really weird part) it has an OLD name.. Like "keyboard" or "software" or something.. I made sure to clear the cache and I actually had the cache turned off, but this is still happening. Also, its putting the products in MULTIPLE categories! I was thinking, since i only changed the DB and not the stock code, someone can just give me a quick export of the DB structure for the categories and the products and I can plug that in maybe> A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
multimixer Posted March 22, 2010 Share Posted March 22, 2010 I don't understand what you mean with " export of the DB structure for the categories and the products " If the database you are doing on is the stock one, or if the tables you cleaned were not altered, you can take the .sql file of the install folder and run only the parts for the tables you need My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
lindsayanng Posted March 22, 2010 Author Share Posted March 22, 2010 Nevermind.. found it A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
lindsayanng Posted March 22, 2010 Author Share Posted March 22, 2010 I fixed it be reinstalling the DB, but I do not understand why removing the contents of the product tables caused this error A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
♥kymation Posted March 23, 2010 Share Posted March 23, 2010 Product data is stored in multiple tables. The basic information is in the products table. The language-dependent parts are in the products_description table. The connection to the categories is in the products_to_categories table. Then there are the attributes in products_attributes, products_options, products_options_values, and products_options_values_to_products_options. Best not to mess with the database directly unless you understand all of the relations between the various tables. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
lindsayanng Posted March 23, 2010 Author Share Posted March 23, 2010 Um, I do understand the relationships to other tables - i cleared out all parts of the DB that have to do with the categories and the products. It was really odd that all of the products AND categories (and their components) were clear as if it were a truely clean install, yet some kept coming back. It was definitely some type of caching problem but I have never had that happen before A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
♥kymation Posted March 23, 2010 Share Posted March 23, 2010 Are you saying that the tables were empty, then some of the rows reappeared? I would be talking to my host about that. I don't want to think what would happen if that were a live site. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
lindsayanng Posted March 23, 2010 Author Share Posted March 23, 2010 The database tables were empty, but when I went to add a NEW category, it would add it, but with the old category name.. Or if i went to add a product it would throw an error but when I hit the back button it would be there but with an old name - just read the original post to see what was happening And I am my own host. I own my own server A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
spooks Posted March 23, 2010 Share Posted March 23, 2010 The database tables were empty, but when I went to add a NEW category, it would add it, but with the old category name.. Or if i went to add a product it would throw an error but when I hit the back button it would be there but with an old name - just read the original post to see what was happening And I am my own host. I own my own server It does sound like the issue jim refered to, the various tables & thier relationships are complex, you are best only deleting product via admin to ensure you don't mess them up. PS the only place data is stored is in the dbase, so if old data returns, you did.nt erase all the old data there. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.