j'insère des donnés contenues dans un xml dans ma base de données mysql/phpmyadmin grâce au tutoriel d'@rthur
http://www.phpfrance.com/forums/voir_reponse-264954.php
Je souhaiterais maintenant insérer les données d'un XML dans différentes tables mysql.
Voici ma requête
Code : Tout sélectionner
mysql_query("INSERT INTO jos_estateagent AND jos_estateagent_categories AND jos_estateagent_images
SET created_by='".($annonce->client)."', obj_id='".($annonce->reference)."',
title='".($annonce->titre)."', description='".($annonce->texte)."',
created='".($annonce->date_saisie)."', path='".($annonce->photo)."',
type='".($annonce->code_type)."', pcode='".($annonce->code_postal)."',
town='".($annonce->ville)."', homes_size='".($annonce->surface)."',
rooms='".($annonce->nb_pieces)."', price='".($annonce->prix)."', id='".($annonce->type)."' ") or die("Erreur MySQL : ".mysql_error()); Code : Tout sélectionner
Erreur MySQL : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND jos_estateagent_categories AND jos_estateagent_images SET created_by='OPTIM' at line 1