use minsan code in link --- Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`highligt_affshop`.`afh_rel_product_brand`, CONSTRAINT `afh_rel_product_brand_ibfk_4` FOREIGN KEY (`brand_id`) REFERENCES `afh_brands` (`brand_id`)) problem if brand_parent != 0 / eg. Product for Source #36 Deadlock found when trying to get lock; try restarting transaction search → --- >Todo OK) List all shops in one page OK) Google schema w/price range OK) Add min for free shipping with products OK) import coupons FIX menu aph OK) Add search box in Search resulta page mobile OK) Add badge approved if min auth from sources_data Move free shipping and default shipping (to be used if not imported) to sources_data check query public function fillGtinByName() { https://www.farmadati.it/ -- Delete wrongly inserted categories by searching newest additions delete from afh_rel_product_term where product_id in ( SELECT product_id FROM ( select product_id from afh_rel_product_term group by product_id having count(rel_id) > 1 and max(date_created) > '2022-09-17' order by count(rel_id) desc /*limit 1000*/ ) AS c ) and date(date_created) = '2022-09-18';