Viewing 11 to 20 of 26 items
Archive | MySql RSS feed for this section

How to fetch complete customer data in magento

I need to fetch whole customer data from mysql by query. I need to get data by entity_id. Please help   ——————————– Answer: Here is what you can do. Activate the sql query log. Edit /lib/Varien/Db/Adapter/Pdo/Mysql.php and set the values for $_debug and $_logAllQueriesto true. then create a custom script that just calls $customerId =  Full Article…

0

Can’t re-index new products – Product Attributes

If you re-index your data and you see this error: Product Attributes index process unknown error: exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`your_database_name`.`catalog_product_index_eav`, CONSTRAINT `FK_CAT_PRD_IDX_EAV_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE)’ in . ..\lib\Zend\Db\Statement\Pdo.php:228 It causes by some products  Full Article…

0

Magento – Delete All Test Data

1. CUSTOMERS SET FOREIGN_KEY_CHECKS=0; — Customers TRUNCATE `customer_address_entity`; TRUNCATE `customer_address_entity_datetime`; TRUNCATE `customer_address_entity_decimal`; TRUNCATE `customer_address_entity_int`; TRUNCATE `customer_address_entity_text`; TRUNCATE `customer_address_entity_varchar`; TRUNCATE `customer_entity`; TRUNCATE `customer_entity_datetime`; TRUNCATE `customer_entity_decimal`; TRUNCATE `customer_entity_int`; TRUNCATE `customer_entity_text`; TRUNCATE `customer_entity_varchar`; ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1; ALTER  Full Article…

0

How to fix magento reindexing with PDOException error?

I got an error when I reindex data. I have been working for about 3 days with this problem still can't find the solution. here is the log error I have received: Default Values (MANAdev) index process unknown error: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:  Full Article…

0

Magento – Removing all products and log tables

You can use the following commands to remove all products and logs.   SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_product_bundle_price_index`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE `catalog_product_bundle_selection_price`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalog_product_entity_decimal`; TRUNCATE TABLE `catalog_product_entity_gallery`; TRUNCATE TABLE `catalog_product_entity_group_price`; TRUNCATE TABLE `catalog_product_entity_int`; TRUNCATE TABLE `catalog_product_entity`; TRUNCATE TABLE `catalog_product_entity_media_gallery`; TRUNCATE TABLE  Full Article…

0

Removing products and categories from the database

Below queries will definitely delete products from database but still few tables have entries for e.g. catalog_product_flat_1, catalog_product_flat_2,etc. So its not wise to delete using below queries. Removing products and categories from the database   These instructions have been copied from: http://www.magentocommerce.com/boards/viewreply/106786/ Truncate products This should remove all the products and their related records. TRUNCATE TABLE  Full Article…

0