Zen Cart Logo
Forums / General Questions / how to delete old items?

how to delete old items?

Locked

Views: 1,525

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
12 Nov 2007, 4:15 PM
#1
rhettius avatar

rhettius

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

how to delete old items?

HI

I've been using easy populate to add items to my shop. A few times, I have wanted to remove a whole category and all its items and re-add new ones. I have deleted the category from the admin menu, thinking that, like deleting a folder in windows, it would delete all subcategories and items in it.

It turns out that these items aren't being deleted. So, I have 48780 items in my database, when I should only have about 23000.

Questions:
-- Why doesn't deleting a category also delete the items?
-- How do I delete all items in a category?
-- How do I delete all my other items, perhaps using easy populate?

Thanks

12 Nov 2007, 4:48 PM
#2
rhettius avatar

rhettius

New Zenner

Join Date:
Feb 2007
Posts:
3
Plugin Contributions:
0

Re: how to delete old items?

I've got 4 main categories. It seems to me that all the junk items - the duplicates that shouldn't be in there - aren't part of the main categories.

I want to do something like this, in mysql:
"delete * from items where category_1 = 'cat1' || category_1 = 'cat2' ".. etc

But I've looked at the mysql structure and there seems to be more than one table for each item. That makes it too complicated for me. Is there a zencart php function to delete an item?