Save icon index to database