Jeeeede Menge updates.
This commit is contained in:
13
convert.php
Normal file
13
convert.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$old = mysqli_connect("localhost","daniel", "ncc74656", "dumbo");
|
||||
$new = new PDO('mysql:host=localhost;dbname=dumbo2', "daniel", "ncc74656");
|
||||
|
||||
$query = $old->query("SELECT * FROM `film_votes`");
|
||||
$target = $new->prepare("INSERT INTO `votes` (`id`, `user`, `film`, `vote`, `created_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?); ");
|
||||
//$settings = $new->prepare("INSERT INTO `settings` (`user`, `key`, `value`) VALUES (?, ?, ?);");
|
||||
|
||||
foreach($query->fetch_all(MYSQLI_ASSOC) as $q) {
|
||||
$target->execute([$q['id'], $q['user'], $q['film'], $q['stimme'], $q['created_at'], $q['updated_at']]);
|
||||
|
||||
}
|
Reference in New Issue
Block a user