If on the trial of any case before the municipal court, it appears that any other person besides the one on trial has violated a provision of this Code or any ordinance of the city, he may then and there be tried, if present, unless the case is continued for legal cause.