fixed sql error

This commit is contained in:
alejandro.campos@artica.es 2022-04-12 17:18:55 +02:00
parent ea07bba78b
commit fdca42eb24
1 changed files with 7 additions and 1 deletions

View File

@ -1159,7 +1159,13 @@ function alerts_create_alert_agent_module($id_agent_module, $id_alert_template,
$values['id_alert_template'] = (int) $id_alert_template;
$values['last_reference'] = time();
return @db_process_sql_insert('talert_template_modules', $values);
$sql = sprintf(
'INSERT IGNORE INTO talert_template_modules(%s) VALUES(%s)',
implode(', ', array_keys($values)),
implode(', ', array_values($values))
);
return @db_process_sql($sql);
}