Salve,
io ho un file che si chiama import.php che inserisce nel DB alcuni dati provenienti da un file XML.
All'interno di import.php c'è questo codice
Codice PHP:
$amenities = $xml->xpath('p[@id='.$hotel['id'].']/amenities/amenity');
if($amenities != "")
{
while(list(,$node) = each($amenities))
{
$qA ="INSERT INTO `amenities` VALUES (".$hotel['id'].",'".addslashes($node)."')";
mysql_query($qA) or die("errore in inserimento
".$qA);
}
}
Il DB ha una tabela che si chiama "amenities" ed un campo che si chiama "id" ma l'importazione da il messaggio "errore in inserimento".
Dove sbaglio?