This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM sales_flat_creditmemo WHERE entity_id=123; | |
UPDATE sales_flat_order_item SET qty_refunded='0.0000', amount_refunded='0.0000', base_amount_refunded='0.0000', hidden_tax_refunded=NULL, base_hidden_tax_refunded=NULL, tax_refunded=NULL, discount_refunded=NULL, base_discount_refunded=NULL WHERE order_id=54255; | |
UPDATE sales_flat_order SET state='complete', status='complete', base_discount_refunded=NULL, base_shipping_refunded=NULL, base_shipping_tax_refunded=NULL, base_subtotal_refunded=NULL, base_tax_refunded=NULL, base_total_offline_refunded=NULL, base_total_refunded=NULL, discount_refunded=NULL, shipping_refunded=NULL, shipping_tax_refunded=NULL, subtotal_refunded=NULL, tax_refunded=NULL, total_offline_refunded=NULL, total_refunded=NULL, adjustment_negative=NULL, adjustment_positive=NULL, base_adjustment_negative=NULL, base_adjustment_positive=NULL, base_total_due=NULL, total_due=NULL, hidden_tax_refunded=NULL, base_hidden_tax_refunded=NULL WHERE entity_id=54255; | |
UPDATE sales_flat_order_grid SET st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//There is a more proper way to do this. | |
$resource = Mage::getSingleton('core/resource'); | |
$write = $resource->getConnection('core_write'); | |
$table = $resource->getTableName('your/model'); | |
//You can Create: | |
$write->insert( | |
$table, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Important! Change attribute_id ;) | |
*/ | |
insert into catalog_product_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) select entity_type_id, attribute_id, store_id, entity_id, value from catalog_product_entity_int where attribute_id = 165; | |
DELETE FROM catalog_product_entity_int WHERE attribute_id = 165; | |
UPDATE eav_attribute SET backend_type='varchar', frontend_input='multiselect', backend_model='eav/entity_attribute_backend_array' WHERE attribute_id = 165; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://docs.shopware.com/de/shopware-5-de/tutorials-und-faq/sql-tipps-tricks | |
SET foreign_key_checks = 0; | |
TRUNCATE `s_user`; | |
TRUNCATE `s_user_addresses`; | |
TRUNCATE `s_user_addresses_attributes`; | |
TRUNCATE `s_user_attributes`; | |
TRUNCATE `s_user_billingaddress`; | |
TRUNCATE `s_user_billingaddress_attributes`; | |
TRUNCATE `s_user_shippingaddress`; |
OlderNewer