John Loyer won his first game in charge of the Detroit Pistons with a 109-100 victory over the San Antonio Spurs.