$products = 'INSERT INTO product(sku, quantity, price) VALUES';
foreach($xml->offers->offer as $product) {
$products .= sprintf('("%s", "%s", "%s""),', $product->vendorCode, $product->quantity, $product->price);
}
INSERT INTO product (sku, quantity, price) VALUES ("123","5","550"),("345","7","950")
$data = [];
foreach($xml->offers->offer as $product) {
$data[$k] = [
'sku' => $product->vendorCode
// еще какие-либо данные
];
}
$query = $db->query("SELECT sku FROM product");
while($row=$query->fetch_assoc()) {
$product_all[] = $row;
}