mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Fixed item sql
This commit is contained in:
parent
24838cad0f
commit
8bde504fc2
@ -1856,7 +1856,7 @@ $class = 'databox filters';
|
||||
'combo_server',
|
||||
$server_name,
|
||||
'',
|
||||
__('Select server'),
|
||||
__('Local metaconsole'),
|
||||
0
|
||||
);
|
||||
?>
|
||||
|
@ -5092,37 +5092,13 @@ function reporting_sql($report, $content)
|
||||
}
|
||||
|
||||
if ($content['treport_custom_sql_id'] != 0) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$sql = io_safe_output(
|
||||
db_get_value_filter(
|
||||
'`sql`',
|
||||
'treport_custom_sql',
|
||||
['id' => $content['treport_custom_sql_id']]
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql = io_safe_output(
|
||||
db_get_value_filter(
|
||||
'"sql"',
|
||||
'treport_custom_sql',
|
||||
['id' => $content['treport_custom_sql_id']]
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$sql = io_safe_output(
|
||||
db_get_value_filter(
|
||||
'sql',
|
||||
'treport_custom_sql',
|
||||
['id' => $content['treport_custom_sql_id']]
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
$sql = io_safe_output(
|
||||
db_get_value_filter(
|
||||
'`sql`',
|
||||
'treport_custom_sql',
|
||||
['id' => $content['treport_custom_sql_id']]
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$sql = io_safe_output($content['external_source']);
|
||||
}
|
||||
@ -5152,10 +5128,6 @@ function reporting_sql($report, $content)
|
||||
$historical_db = $content['historical_db'];
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
$result = db_get_all_rows_sql($sql, $historical_db);
|
||||
if ($result !== false) {
|
||||
foreach ($result as $row) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user