function _optimizedb_list_tables_operation_execute_run in OptimizeDB 7
Same name and namespace in other branches
- 8 optimizedb.module \_optimizedb_list_tables_operation_execute_run()
- 6 optimizedb.module \_optimizedb_list_tables_operation_execute_run()
Batch callback: Common tasks checking, repairs and optimizes tables.
Parameters
array $param: Table names and types of operations.
array $context: Reference to an array used for Batch API storage.
1 string reference to '_optimizedb_list_tables_operation_execute_run'
- _optimizedb_list_tables_operation_execute in ./
optimizedb.module - Performing operations on tables.
File
- ./
optimizedb.module, line 512 - Database Optimization.
Code
function _optimizedb_list_tables_operation_execute_run($param, &$context) {
$operation_result = db_query($param['operation'] . ' ' . $param['name'])
->fetchAll();
foreach ($operation_result as $result) {
if (isset($result->Msg_type) && in_array(strtolower($result->Msg_type), array(
'error',
'warning',
))) {
$context['results']['errors'][] = array(
array(
'data' => $param['name'],
),
array(
'data' => $result->Msg_type,
),
array(
'data' => $result->Msg_text,
),
);
}
}
}