Jump to content

Fejl på database


Alex_Hansen

Recommended Posts

Hejsa ... Håber nogen kan/vil hjælpe mig da jeg bestemt ikke er en ørn ud i databaser.

Jeg fik oprettet en vare med åbenbart for mange Attributer, men nu kan jeg ikke slette varen igen eller ændre noget som helst på andre varer, kunder osv.

Det virker som om at databasen er totalt låst.

 

Jeg får følgende fejlmeddelse:

 

1 fejl

der opstod en fejl under opdatering af objekt product (User 'mysqluser13535' has exceeded the 'max_updates' resource (current value: 25000))

 

HVAD GØR JEG for at få min shop til at fungerer igen???

 

PLEASE HELP ....

Link to comment
Share on other sites

Først skal du slette selve varen x:

 

DELETE FROM `ps_product` WHERE `id_product` = x

så mangler du at rydde op alle de steder, hvor varen bliver refereret. De følgende linier udfører en helt generel oprydning:

 

DELETE FROM `ps_attribute_impact` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_category_product` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_image` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_image_lang` WHERE `id_image` NOT IN (SELECT `id_image` FROM `ps_image`);
DELETE FROM `ps_product_lang` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_product_attribute` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_product_attribute_combination` WHERE `id_product_attribute` NOT IN (SELECT `id_product_attribute` FROM `ps_product_attribute`);
DELETE FROM `ps_product_attribute_image` WHERE `id_product_attribute` NOT IN (SELECT `id_product_attribute` FROM `ps_product_attribute`);
DELETE FROM `ps_feature_product` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);
DELETE FROM `ps_feature` WHERE `id_feature` NOT IN (SELECT `id_feature` FROM `ps_feature_product`);
DELETE FROM `ps_feature_lang` WHERE `id_feature` NOT IN (SELECT `id_feature` FROM `ps_feature`);
DELETE FROM `ps_feature_value` WHERE `id_feature` NOT IN (SELECT `id_feature` FROM `ps_feature`);
DELETE FROM `ps_feature_value_lang` WHERE `id_feature_value` NOT IN (SELECT `id_feature_value` FROM `ps_feature_value`);
DELETE FROM `ps_manufacturer` WHERE `id_manufacturer` NOT IN (SELECT `id_manufacturer` FROM `ps_product`);
DELETE FROM `ps_manufacturer_lang` WHERE `id_manufacturer` NOT IN (SELECT `id_manufacturer` FROM `ps_manufacturer`);
DELETE FROM `ps_specific_price` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`);

 

/Kjeld

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...