Rebuild rp_products.numreviews ?
Is there any way to rebuild the stats in the product table? For example the numbers in rp_products.numreviews and the rating averages for the products?
For some reason mine aren't right. For example I have a product that have 2 reviews, yet in the category listings it shows "3" because the that's what's in the rp_products table.
When you go to see the product itself the stats are all right.
I think that when the some old reviews were deleted the relevant product stats weren't updated. No idea why, could be down to using beta test code ages ago.
Edit: Hmm interesting (just tried something).
If you add a review, then delete it, the product's ratings are updated in the product table, however the number of reviews recorded against that product (again in the product table) is reduced by one.
Would it be better upon deletion or addition of a new/old review to calculate the number of reviews, rather than increasing or decreasing numreviews by one?
Last edited by Arnie; October 26th, 2005 at 01:46 PM.