Skip to main content
5 of 5
deleted 43 characters in body

Adding to @GDP's answer

...
$columns = array('user_id', 'type', 'object', 'lvl', 'date');
$values  = array();
foreach ($batch as $row) {
    $array    = array(
        $row->user_id,
        $db->quote($row->type),
        $db->quote($row->object),
        $db->quote($row->lvl),
        $db->quote($row->date),
    );
    $values[] = implode(',', $array);
}
$query->insert($db->quoteName('#__activity_log'));
$query->columns($db->quoteName($columns));
$query->values($values);
...