|
Hello!
I was trying do delete all magento categories, using some php script like:
$categories = $db_read->fetchCol("SELECT entity_id FROM “ . $resource->getTableName("catalog_category_entity") . “ WHERE entity_id>1 ORDER BY entity_id DESC");
foreach ($categories as $category_id) {
try {
Mage::getModel("catalog/category")->load($category_id)->delete();
} catch (Exception $e) {
echo $e->getMessage() . “\n”;
}
}
Some of categories are not deleted.In browser is displaying SQLSTATE[HY000]: General error: 1030 Got error -1.
I cant even delete those categories from admin page.
Can anybody help me solving this?
|