

===============================================================================
User: 1  |  Time: 14:18:02  |  URL: /apple_clinic/InventoryAjax/ajax_sync_website

Array
(
    [0] => 23000
    [1] => 1452
    [2] => Cannot add or update a child row: a foreign key constraint fails (`applecliniclb`.`products_categories`, CONSTRAINT `products_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE)
)

         INSERT INTO applecliniclb.products_categories (product_id,category_id)         SELECT sp.Product_ID,  sp.Category_ID          FROM tbl_stock_products sp         WHERE NOT EXISTS (             SELECT 1             FROM applecliniclb.products_categories p             WHERE p.id = sp.Product_ID and p.category_id = sp.Category_ID          );                   


===============================================================================
User: 1  |  Time: 14:20:44  |  URL: /apple_clinic/InventoryAjax/ajax_sync_website

Array
(
    [0] => 23000
    [1] => 1452
    [2] => Cannot add or update a child row: a foreign key constraint fails (`applecliniclb`.`products_categories`, CONSTRAINT `products_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE)
)

         INSERT INTO applecliniclb.products_categories (product_id,category_id)         SELECT sp.Product_ID,  sp.Category_ID          FROM tbl_stock_products sp         WHERE NOT EXISTS (             SELECT 1             FROM applecliniclb.products_categories p             WHERE p.id = sp.Product_ID and p.category_id = sp.Category_ID          );                   
