"Mark all as read" SQL query fix