If the appellant be found guilty of violation of the ordinance in question, whether upon the verdict of a jury or otherwise, the Court shall ascertain by its judgment the fine or imprisonment, or the fine and imprisonment, to be paid or suffered by such defendant, having regard to the punishment prescribed by such ordinance, and shall include in any such judgment the costs incurred by said City, as well in the proceedings before the Mayor, as those in Court, and the fee, if any, of the jailer or the keeper of the City prison; and the proceedings to enforce the collection of any such fines and costs, may be the same as provided in sections ten, eleven and twelve of chapter thirty-six of the Code of West Virginia, except that the writ mentioned in the tenth section may be issued by the Clerk upon the order of the Mayor of the City and the notice contemplated by the eleventh section shall be given to such officer. If the judgment be for the defendant he shall recover his costs from the City.