Skip to content

Commit

Permalink
Merge pull request #12 from bragento/master
Browse files Browse the repository at this point in the history
Preventing Error if $categoryTableTmp already exists
  • Loading branch information
danslo committed Jun 24, 2014
2 parents d819afd + b6dffff commit 29522ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/Model/Import/Entity/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ protected function _updateChildCount()

$categoryTable = Mage::getSingleton('core/resource')->getTableName('catalog/category');
$categoryTableTmp = $categoryTable . '_tmp';
$this->_connection->query("CREATE TEMPORARY TABLE {$categoryTableTmp} LIKE {$categoryTable};
$this->_connection->query("CREATE TEMPORARY TABLE IF NOT EXISTS {$categoryTableTmp} LIKE {$categoryTable};
INSERT INTO {$categoryTableTmp} SELECT * FROM {$categoryTable};
UPDATE {$categoryTable} cce
SET children_count = (
Expand Down

0 comments on commit 29522ba

Please sign in to comment.