mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Introduce apply_queries function
This commit is contained in:
@@ -361,6 +361,21 @@ function queries($query = null) {
|
||||
return $connection->query($query);
|
||||
}
|
||||
|
||||
/** Apply command to all array items
|
||||
* @param string
|
||||
* @param array
|
||||
* @param callback
|
||||
* @return bool
|
||||
*/
|
||||
function apply_queries($query, $tables, $escape = 'table') {
|
||||
foreach ($tables as $table) {
|
||||
if (!queries("$query " . $escape($table))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Redirect by remembered queries
|
||||
* @param string
|
||||
* @param string
|
||||
|
Reference in New Issue
Block a user