I wanted to update this thread for a couple of reasons. First of all, a shout-out for the Zen crew, who work really hard for us even though we may not always see that. It can be hard to look beyond the tunnel sometimes, especally when things aren't working and we're frustrated. However, I have to say that Linda and DrByte have gone beyond the pale several times now, and I, for one, am greatly appreciative.
Though it took me a while to get around to it, thanks to Linda I was able to thoroughly clean my database and match everything. I have what I believe is the correct number of attributes vs. download attributes, products vs. their descriptions, etc., etc. It looks mighty pretty, if I do say so myself! ;)
All it took was a few database queries to cross-check the appropriate tables, then a little research into the discrepancies. Linda was very kind to steer me in the right MySQL direction and I was able to flesh out the rest on my own.
I found stuff hanging around from products long gone, all the way to products being in inventory and loaded fine, yet the download attribute number wasn't the same in Zen vs. the database. Some downloads that seemed fine in Zen weren't in the database at all. It was a mishmash, yet easily fixed once I became familiar with the relationship between the tables and how to write a query. Thank you again, Linda! You are awesome. :)
In case it helps anyone else, the basic query you need looks like this:
Find missing products vs products_description:
Code:
SELECT * FROM zen_products_description WHERE zen_products_description.products_id
NOT IN (SELECT zen_products.products_id FROM zen_products);
I also used this one to check for empty download files:
Code:
SELECT * FROM zen_products_attributes_download WHERE products_attributes_filename = '';
All you have to do is cross-check your product tables and category tables (and any mod or auxiliary function tables involving products, such as reviews, wishlists, etc.) and make sure everything is even. You may have old descriptions without a product, or vice versa, or products tied to a master category which no longer exists, etc. In the case of something like wishlists, I simply deleted the products that no longer exist.
Download attributes were a bit trickier. Only the attributes table ties to a product ID, so I used that as my control. After I was able to clear the sort of discrepancies I mentioned above, my numbers are perfect. I have one more attribute than download, which is absolutely correct, given I have one text attribute that's part of a gift certificate mod. Everything else matches to the tee. I love it!
Hope this helps someone as you were kind enough to help me. Thank you again! :)