Appellant being charged in the recorder’s court of the city of Troy with a violation of a municipal ordinance, the recorder, or the mayor sitting as recorder, using a blank form printed upon his docket, entered judgment as follows: “Defendant pleads-guilty. On hearing the evidence the court is of the opinion, that the defendant is- guilty. It is considered and adjudged by the court that the defendant is - guilty, and is fined $100.00 and $2.00 costs, and is sentenced to 180 days extra a,t hard labor for the *109mayor and councilmen of Troy. The fine and costs not being presently paid, or judgment confessed therefor as provided by law, defendant is sentenced to hard labor for the mayor and councilmen of Troy-days to pay fine — to pay costs.” This sentence, authenticated by the mayor’s signature, was passed on February 21, 1910. On June 2d, following, appellant sued out a writ of habeas corpus to procure his discharge upon the ground that he was being unlawfully restrained of his liberty. At the hearing he was remanded; hence this appeal.
This court, concurring with all others, holds that the writ of habeas corpus cannot be made to do service for an appeal or writ of error, and that the writ is not addressed to questions of error or irregularity, but to the question whether the judgment and sentence under which the petitioner is held is a mere nullity.—Ex parte Simmons, 62 Ala. 416; Ex parte Roberson, 123 Ala. 103, 26 South. 645, 82 Am. St. Rep. 107; Ex parte Bizzell, 112 Ala. 210, 21 South. 731.
Since the adoption of the Code of 1907, the name and style of the prosecuting municipality has been the “City of Troy,” and there is no corporation now known as the “Mayor and Councilmen of Troy.” If an ample judgment and sentence required that the beneficiary of the labor to be performed by the defendant should be correctly stated, the judgment and sentence pronounced was defective in this respect. But the mayor and councilmen exercise for the city the legislative, executive, and judicial powers conferred upon the incorporated municipality, or such of those powers as are executive or judicial are exercised by their duly elected or appointed officers and agents. Under the judgment and sentence imposed in this case there can be no plausible pretense that appellant was sentenced to pay a *110fine to, or perform bard labor fox', tbe individuals filling the offices of mayor and couneilmen, and at most tbe sentence was irregular only.
Section 1216 of tbe Code of 1907 provides that: “Tbe recorder trying any person for violation of any by-law or ordinance of the city shall, upon conviction of such person, have tbe power to fine and imprison him, and to sentence him to bard labor upon tbe. streets or public works, or in tbe workhouse or bouse of correction of tbe city; and, in tbe event fine and costs are not presently paid, to require tbe offender or person thus in default, to work out tbe fine and costs under tbe direction of tbe city authorities, allowing not exceeding one dollar for each day’s service; provided, that no fine shall exceed one hundred dollars, and no sentence to imprisonment or bard labor shall exceed six months.” This section must be read in connection with section 1251, which grants to municipal corporations the power to enforce obedience to their ordinances “by fine not exceeding one hundred dollars and by imprisonment or bard labor not exceeding six months, one or both.” Tbe construction is that these sections authorize the imposition in tbe same case of both a maximum fine, to be paid by labor at a rate not exceeding |1 for each day’s service, if not presently paid in cash, and an additional maximum teimi of six months. This leaves it to tbe municipalities to fix by ordinance any smaller reasonable rate at which labor shall be estimated when exacted in payment of fine and costs, and lodges in them a discretion in the ordination of their laws which may tempt to the fixing of a rate oppressive to the poor and needy. However, we are not pirepared to say that the ordinance to be inferred in this case is unreasonable or oppressive in this regard. Besides, if it be assumed that there was a,n intention to sentence for the payment *111of fine and costs, tlie expression of that intention upon the record Avas insufficient, ineffectual, and may be treated as mere surplusage. The term for which the defendant was sentenced to hard labor for the payment of fine and costs should have been definitely set down in the judgment. It should not have been left to inference. So, then, in no event did the recorder, or the mayor sitting as recorder, exceed his jurisdiction in imposing the perfectly definite sentence to hard labor for a term of 180 days.
As for the other objections taken against the ruling below, it will suffice to say that while municipal magistrates, whose courts are not courts of record, may not set all forms at naught in thé exercise of the summary jurisdiction conferred upon them by the statute, yet it is now well-established doctrine that the courts will go to all reasonable lengths to support their judgments when assailed by the writ of habeas corpus.—Church, Hab. Corp. § 296. In Ex parte Bizzell, supra, this court said: “The judgment of a justice of the peace or a mayor of a city with like authority, having jurisdiction conferred by law, to try and dispose of a criminal case, is as conclusive and rests upon the same basis, when the jurisdiction has attached, as the adjudication of any other common-law court. No error in the proceedings which did not affect the jurisdiction will render the judgment void, nor can errors of the kind be considered when the judgment is collaterally assailed. Parol evidence is not admissible for the purpose. The illegality complained of must appear on the face of the proceedings.” And further: “A policeman or town marshal may, without warrant, arrest any person who commits a public offense in his presence.” The statute confers that authority. In Aderhold v. Anniston, 99 Ala. 521, 12 South. 472, it was held that, where a *112person went to trial without objection before the recorder of Anniston on a yerbal charge of violating a ■city ordinance, he must be presumed to have waived the want of an affidavit.
We think the recitals of the judgment of conviction in this case are sufficient to show the personal presence of the petitioner in court when the trial was had and the judgment of conviction rendered. If the judgment were insufficient for that purpose, or is to be treated as silent upon the subject, it was competent to show by evidence aliunde this jurisdictional fact.—Church, Hab. Corp. § 268.
Remarking that on the record before us appellant’s sentence does not appear to have been cumulative upon another sentence in another case, as it was necessary that it should appear if it was intended so to operate, it must be held that his sentence began from the date of its rendition, and that he cannot become entitled to a discharge in advance of the expiry of the term of the sentence, we state our opinion that the judgment and order of the judge of probate remanding appellant must be affirmed.
Affirmed.
Dowdell, C. J., and Anderson and Somerville, JJ., concur.