First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$databases = array(
|
||||
'hotlunch_20210427',
|
||||
'hotlunch_20210628',
|
||||
'hotlunch_20210701',
|
||||
'hotlunch_20210922',
|
||||
'hotlunch_20220430',
|
||||
'hotlunch_20220714',
|
||||
'hotlunch_20221007',
|
||||
'hotlunch_20230424',
|
||||
// 'hotlunch_20230624',
|
||||
// 'hotlunch_20230704',
|
||||
'hotlunch_20240824',
|
||||
'hotlunch_20240825',
|
||||
'hotlunch_20240826',
|
||||
'hotlunch_20240827',
|
||||
'hotlunch_20240828',
|
||||
);
|
||||
|
||||
|
||||
for ($i = 0; $i < count($databases); $i++) {
|
||||
$db = $databases[$i];
|
||||
echo("$db\n");
|
||||
|
||||
db_query("USE $db");
|
||||
|
||||
$query = "DROP TABLE IF EXISTS language_text_new";
|
||||
db_query($query);
|
||||
|
||||
$query = "CREATE TABLE language_text_new LIKE hotlunch.language_text";
|
||||
db_query($query);
|
||||
|
||||
$query = "INSERT INTO language_text_new SELECT * FROM hotlunch.language_text";
|
||||
db_query($query);
|
||||
|
||||
$query = "DROP TABLE language_text";
|
||||
db_query($query);
|
||||
|
||||
$query = "CREATE TABLE language_text LIKE hotlunch.language_text";
|
||||
db_query($query);
|
||||
|
||||
$query = "INSERT INTO language_text SELECT * FROM language_text_new ON DUPLICATE KEY UPDATE language_text.english = language_text_new.english";
|
||||
db_query($query);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user