wersja ta sama
fragment pliku XML dostawcy:
<data>
<product_list>
<product>
<product_id>23123</product_id>
<product_name>nazwa</product_name>
<product_code>kod</product_code>
<category_id>7</category_id>
<brand>producent</brand>
<price_b2b_net>610.00</price_b2b_net>
<price_retail_gross>910.00</price_retail_gross>
<price_retail_gross_with_discount>910.00</price_retail_gross_with_discount>
<quantity>0</quantity>
</product>
</product_list>
</data>
pobranie wartości z cennika i zapisanie do zmiennych:
$xml = new SimpleXMLElement($cennik);
foreach($xml->product_list->product as $product)
{
$product_id = (int)$product->product_id;
$product_name = $product->product_name;
$product_code = $product->product_code;
$category_id = (int)$product->category_id;
$brand = $product->brand;
$price_b2b_net = (float)$product->price_b2b_net;
$price_retail_gross = (float)$product->price_retail_gross;
$price_retail_gross_with_discount = (float)$product->price_retail_gross_with_discount;
$quantity = (int)$product->quantity;
}
zapytanie aktualizujące:
$zapytanie = 'UPDATE _aktualizacja_cennik SET '
.'product_name=\''.addslashes($product_name).'\', ' .'product_code=\''.addslashes($product_code).'\', ' .'category_id='.$category_id.', '
.'price_b2b_net='.$price_b2b_net.', '
.'price_retail_gross='.$price_retail_gross.', '
.'price_retail_gross_with_discount='.$price_retail_gross_with_discount.', '
.'quantity='.$quantity.', '
.'ostatnio_w_cenniku=\''.date("Y-m-d").'\' ' .'WHERE product_id='.$product_id;
$wynik = $mysqli->query($zapytanie);
wątpię, że to coś w kodzie (chyba, że brakującego;)) - skrypt uruchamiany z przeglądarki działa ok.
fragment zapytania wygenerowanego podczas uruchomienia przez przeglądarkę:
UPDATE _aktualizacja_cennik SET product_name='nazwa', product_code='kod', category_id=7, brand='producent', price_b2b_net=610, price_retail_gross=910, price_retail_gross_with_discount=910, quantity=0...
fragment zapytania wygenerowanego podczas uruchomienia przez cron:
UPDATE _aktualizacja_cennik SET product_name='nazwa', product_code='kod', category_id=7, brand='producent', price_b2b_net=610, price_retail_gross=910, price_retail_gross_with_discount=910, quantity=1...

kodowanie wszędzie (baza, skrypty, plik) UTF-8
Temat można zamknąć, problem był idiotyczny i związany ze ścieżką do pliku XML - w skrypcie była podana ścieżka względna, zamiast bezwzględnej.