1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 01:54:00 +02:00

Introduce apply_queries function

This commit is contained in:
Jakub Vrana
2010-05-17 18:18:32 +02:00
parent c85ef695d0
commit f9bb1c5c64
6 changed files with 26 additions and 66 deletions

View File

@@ -269,30 +269,15 @@ if (isset($_GET["oracle"])) {
}
function truncate_tables($tables) {
foreach ($tables as $table) {
if (!queries("TRUNCATE TABLE " . table($table))) {
return false;
}
}
return true;
return apply_queries("TRUNCATE TABLE", $tables);
}
function drop_views($views) {
foreach ($views as $table) {
if (!queries("DROP VIEW " . table($table))) {
return false;
}
}
return true;
return apply_queries("DROP VIEW", $views);
}
function drop_tables($tables) {
foreach ($tables as $table) {
if (!queries("DROP TABLE " . table($table))) {
return false;
}
}
return true;
return apply_queries("DROP TABLE", $tables);
}
function begin() {