Re,
Je recois ca par formulaire :
echo $data['queryForm'];
INSERT INTO users (`id`, `mail`, `login`, `password`, `role`) VALUES (NULL, '1test@hotmail.com', 'qaz', 'Thomas0', 'reader' ) ; INSERT INTO `xxx`.`Users_profil` ( `id` ,`FirstName` ,`LastName` ,`Mail` ,`Title` ,`Company` ,`Website` ,`Street` ,`Town` , `State` ,`Zip` ,`Country` ,`Mobile` ,`Phone` ,`Fax` ,`Comment` ,`Categorie` )VALUES ( NULL , '', '', '1test@hotmail.com', '', '', '', '', '', '', '', (SELECT rowid FROM Country where en='Afghanistan'), '', '', '', '', (SELECT id FROM Categorie where Name='Company') ) ; INSERT INTO `xxx`.`Personnes` (`id`, `id_login`, `id_profil`, `type`, `DateCrea`, `DateEdit`) VALUES (NULL, (SELECT id FROM users where mail='1test@hotmail.com'), (SELECT id FROM Users_profil where Mail='1test@hotmail.com'), 'USER', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) ; INSERT INTO Link_Type (`id`, `id_P`,`id_T`, `id_ST`,`id_ST_1`) VALUES (NULL, (SELECT id FROM Users_profil where Mail='1test@hotmail.com'), (SELECT id FROM Type_ WHERE Name='AGRI'), (SELECT id FROM Sous_type WHERE Name='Spacial'),'') ;
et je dois lancer toutes c'est requete.
J'ai tester en faisant ca :
preg_match_all("#(.+;)#Ui", $sql, $resultat);
$variable = 0;
$count = sizeof($resultat[0]);
while ($variable < $count)
{
mysql_queries($res, $link) or die(mysql_error());
$variable++;
}
}
Ca fonctionne si je copie colle tout les requete dans une variable et que j'utilise cette fonction. Mais, si je le fait directement avec la variable $data['queryForm'];, ca bug. c'est completement illogique.
Je vais jeter un oeil a ton explode()