join catalog_category_product_synch s on p.category_id = s.live_category_id set p.category_id = s.category_id; "; $this->exec($query); $query = " drop table if exists catalog_category_product2; create table catalog_category_product2 like catalog_category_product; insert into catalog_category_product2 select * from catalog_category_product; "; $this->exec($query); $query = " delete from catalog_category_product; insert into catalog_category_product select * from catalog_category_product_fm3; "; $this->exec($query); }*/ public function exec($query) { $connection = $this->connection; try { $connection->exec($query); } catch (Exception $e) { echo $query . "\n"; echo $e->getMessage(); } } } echo date("\nY-d-m H:i:s") . " - catalog category import start\n"; $imp = new Category_Export(); $imp->catalog_category_product_synch(); echo date("\nY-d-m H:i:s") . " - catalog category import completed\n";