1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| $requete_SHOW="SHOW TABLES";
$table_nom="";
$result_SHOW=mysql_query($requete_SHOW);
while ($ligne_01=mysql_fetch_row($result_SHOW))
{
$table_nom=$ligne_01['0'];
$requete_SELECT="SELECT * FROM $table_nom";
$result_SELECT=mysql_query($requete_SELECT);
echo "<p>insertion des enregistrements de la table ".$table_nom."</p>";
while ($ligne_02=mysql_fetch_array($result_SELECT))
{
$requete_INSERT="
INSERT INTO nom_de_ta_nouvelle_table
(
nom_ancienne table,
noms,
temps,
points,
circuit
)
VALUES
(
'$table_nom',
'$ligne_02['noms']',
'$ligne_02['temps']',
'$ligne_02['points']',
'$ligne_02['circuit']'
)";
$result_INSERT=mysql_query($requete_INSERT);
}
} |
Partager