connection->getQueryBuilder(); $update->update('talk_attendees') /** * -2 is {@see ChatManager::UNREAD_FIRST_MESSAGE}, but we can't use * it in update code, because ChatManager is already loaded with the * previous implementation. */ ->set('last_read_message', $update->createNamedParameter(-2, IQueryBuilder::PARAM_INT)) ->where($update->expr()->eq('last_read_message', $update->createNamedParameter(0, IQueryBuilder::PARAM_INT))); $updatedEntries = $update->executeStatement(); if ($updatedEntries) { $output->info($updatedEntries . ' attendees have been updated.'); } } }