Tabelle kopieren



Mittels CREATE TABLE()-Funktion und SELECT * FROM lässt sich eine bestehende Tabelle kopieren mit Inhalt.


<?php

$servername = "yourservername";
$username = "yourusername";
$password = "yourpassword";
$dbname = "yourdbname";

$con = mysqli_connect($servername,$username,$password,$dbname);

$res = mysqli_query($con, "CREATE TABLE dataupdate SELECT * FROM data");

$num = mysqli_num_rows($res);

mysqli_close($con);

?>



created by NETTECS.ch