1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
$req =$dbmy->prepare('INSERT INTO matable(id,attribut2,attribut3,attribut4,attribut5,attribut6)Values(:id,:attribut2,:attribut3,:attribut4,:attribut5,NOW())');
for ($i=1;$i<=350;$i++) {
// Liste des paramètres préparés
$dh=array (
'id'=>'332210D2109900'.$i,
'attribut2'=>'0',
'attribut3'=>'',
'attribut4'=>'0',
'attribut5'=>'0'
);
try {
// Exécution de la requête
$req->execute($dh);
}
catch(PDOException $e) {
echo "<br>";
print 'Erreur ! : '.$e->getMessage().'<br/>';
echo 'Code n° : '.$e->getCode();
echo "<br>";
echo 'ligne n° : '.$e->getLine();
} |
Partager