Grazie Alhazred.
Avevo pensato anche io al set dei caratteri, ma nel codice utilizzo solo variabili.
Per non saper nč leggere, nč scrivere ho provato a modificare le impostazioni dell'editor (notepad++), ma nulla cambia.
Comunque questo č il mio codice
codice:
$this->db->query("UPDATE " . DB_PREFIX . "product_description
SET name = '" . $this->db->escape($description_it) . "'
WHERE product_id = '" . (int)$product_id . "' AND language_id = '2'");
-name- corrisponde alla descrizione del prodotto.
mentre questo č il codice di opencart per l'inserimento dei prodotti
codice:
$this->db->query("DELETE FROM " . DB_PREFIX . "product_description
WHERE product_id = '" . (int)$product_id . "'");
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description
SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "',
name = '" . $this->db->escape($value['name']) . "',
meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "',
meta_description = '" . $this->db->escape($value['meta_description']) . "',
description = '" . $this->db->escape($value['description']) . "',
tag = '" . $this->db->escape($value['tag']) . "'");
}
e la function di Opencart
codice:
public function escape($value) {
if ($this->link) {
return mysql_real_escape_string($value, $this->link);
}
}