Through transfers made to him by the several parties to whom, the certificates were originally issued, appellant became the owner of certain witness tickets theretofore issued to various parties who had attended as Avitness in behalf of the State, either on the trial of certain cases in the courts or before the grand juries of Greene county, Ala. Appellant as the transferee and owner of these Avitness tickets filed a petition with the circuit judge of the Sixth judicial circuit, seeking, to compel by mandamus the respondent, as clerk of the circuit court of Greene County to certify the facts necessary to make the claims evidenced by said witness tickets charges against the fine and forfeiture fund of Greene county, alleging transfer and ownership of the claims, previous demand made upon the clerk, and refusal upon his part to act. The defendant accepted service, and filed a combined demurrer, answer, and pleas. The court below overruled the demurrers to the *513petition, whereupon the petitioner demurred separately to each of the different pleas setting up various statutes of limitation, which demurrers to the several pleas were overruled and the cause Avas submitted on the petition, the ansAver of the respondent, and the pleas setting up the statutes of limitation. On a hearing of the petition, the lower court denied the relief prayed for, and dismissed the petition. This appeal is from that order, the appellant assigning as error the ruling of the lower court in overruling the demurrers to the pleas of the statutes of limitation, and the action of the court below in refusing the prayer and dismissing the petition. Copies of the Avitness certificates held by petitioner as transferee and made the basis of his application were attached to the petition, and are set out in the record and marked as Exhibits A. B. C. D. E. F. G. and H. It appears that these tickets or certificates were issued in the years 1896 and 1898, AAdiile this petition Avas not filed until the 5th day of April, 1911.
Whether proceedings in mandamus fall within the terms of statutes of limitation governing ordinary cases and the right to relief can be barred by such statutes is a question upon which the authorities are not in harmony, but it is only a proper application of the rule that the relator must show a clear right in himself to have a duty performed to refuse the aid of mandamus Avhere the right of the relator to demand it depends upon doubtful and disputed questions Avhich require a legal controversy for their settlement; and Avhere the relator has slept upon his rights for an unreasonable length of time, and the legal right is doubtful because of the application of the doctrine of laches, the facts having become obscured and the performance of the act required necessitating the determination of disputed questions, the court may properly exercise a discretion in refusing the *514application, taking into consideration the statute of limitations in analogous civil actions. — 2 Spelling on Extraordinary Relief, §§ 1382, 1386; High on Ex. Legal Rem. (3rd Ed.) § 30b, pp. 37, 38.
The allegations of the petition with reference to presentment and demand are in the following language: ‘‘That, before the filing of this petition, your petitioner presented the said certificates, which had been issued for said witness in the circuit court of said county, to the defendant, R. E. Mobley, as clerk of the circuit court of said county, at his office, and demanded that he, as.such clerk, issue certificates, stating the said facts herein-above set out, * * and that, before the filing of this petition, he further presented the said certificates so issued to said state’s witnesses before the said grand jury, and hereinabove described, to the said R. E. Mobley, as such circuit clerk, at his office and requested and demanded that said clerk certify the said facts necessary > to make said claims charges against the fine and forfeiture fund on the original certificates issued by the foreman of the grand jury as provided by law; but that the said clerk failed and refused, and yet fails and refuses, to comply with the requests and demands so made by your petitioner, and fails and refuses to issue and make such certificates or any of them.”
The liability of the fine and forfeiture fund for the payment of costs or fees is entirely of statutory origin, and therefore it is necessary to bring these claims within the operation of the statute as a, necessary prerequisite to fixing any charge on such fund.—Jackson v. Derrick, 117 Ala. 365, 23 South. 193; Alston v. Yerby et al., 108 Ala. 480, 18 South. 559; Herr v. Seymour, 76 Ala. 270.
Section 6660 of the Code of 1907 sets forth the cases and contingencies under which the county is liable for witness fees, and has reference to strictly criminal cases. *515The petition shows on its face that the certificate issued to J. McBrown (Exhibit A) was for attendance as a witness in a habeas corpus proceeding instituted by a certain party under indictment for murder for the purpose of obtaining bail, and that bail was granted, and the defendant subsequently acquitted. Section 7042 of the Code provides that- in habeas corpus cases “witnesses may prove their attendance before the judge or chancellor, as in other cases, and have the same taxed in the bill of costs on the subsequent conviction of the party, where he is detained on a criminal charge.” The right to have witness fees taxed in the bill of costs in these proceedings depends, therefore, upon the subsequent conviction of the party. The petition showing that the party in whose case this certificate was issued was acquitted, there is no provision by which the witness fees could be taxed as a part of the costs chargeable upon the fine and forfeiture fund. This certificate, of which Exhibit A is a copy, does not fall within the provisions of section 6660 of the Code, and there is no authority or warrant in law for its holder to demand its certification as a charge against the county -or ' any fund of the county.
The certificate of which Exhibit D is a copy was issued to a witness for the state in a bastardy proceeding, and a proceeding in bastardy is not a criminal case, and the fees of witnesses in such cases are not proper charges against the fine and forfeiture fund.—Shows v. Solomon, 91 Ala. 390, 8 South. 713.
The certificate of which Exhibit G is a copy does not seem to have been issued by authority of law, and is not entitled to registration under section 6660 of the Code. This certificate was issued by the foreman of the grand jury at the spring term of the circuit court of Greene county in 1898 and certifies to the attendance by a wit*516ness, one B. B. Barnes, before a grand jury held at the spring term of the court in the year 1891. By what authority the foreman of the grand jury a.t a term of court held in 1898 certifies to the attendance of a witness before a grand jury held in 1891 we are not apprised. Section 7296 of the Code of 1907, as we construe it, only authorizes the foreman of the grand jury before whom the witness appeared to certify to his attendance. According to the averments of the petition this certificate was issued “in a case being investigated by said grand jury where a true bill was found by said grand jury at the spring term, 1891, but the defendant who was so indicted has never been arrested.” Such a case is not included in those mentioned in section 6660 making the county liable or making the witness fee chargeable against the fine and forfeiture fund.
It will be seen that it appears from the allegation of the petition that two demands were made upon the clerk —one to certify a number of witness tickets issued for appearances before the circuit court; the other to certify a number of witness tickets issued by the forman to witness who appeared before the grand jury, and it appears from the face of the petition that each of these demands included the demand to certify as charges against the fine and forfeiture fund certificates which, under the law, were not proper charges against the fund. Such a demand the clerk was clearly within his rights in refusing. The petition must disclose such a state of facts as will prima facie entitle the petitioner to the writ.—Jones, Ex parte, 1 Ala. 15; High on Ex. Legal Rem. (3d Ed.) § 449.
A party must have a clear legal right to the performance of a specific duty with respect to the entire cause of action presented, must show himself entitled to the entire remedy, or mandamus cannot properly be award*517ed.—Goodwyn, Judge, ets v. Sherer et al., 145 Ala. 501, 40 South. 279; Minchener v. Carroll, Treas, etc., 135 Ala. 409; 33 South. 168; High on Ex. Rem. (2d Ed.) § 540, 2 Spelling on Ex. Relief, §§ 370, 1387.
In this case the petition shows that the petitioner did not have the clear legal right with respect to the entire cause of action presented as to either of the demands made by him on the clerk to certify the two sets of tickets presented upon which demand was made. Even if it were uncertain from the language of the petition whether the demand was made to certify the sets as a whole or the individual constituents of each set, the result would be the same, for there would be an undoubted failure to show the clear legal right to the entire remedy sought.—Goodwyn, Judge, etc., v. Sherer supra; Minchener v. Carroll, Tras., etc., supra. Or, as expressed by Mr. High in his work on Ex. Leg. Rem. § 539: “When, therefore, the alternative writ demands more than the relator is entitled to, judgment will be given for the respondent, and the court will not give judgment for the relator as to a part of the requirement of the writ, and for the respondent as to the residue.”
Moreover, it appears that these certificates were issued many years ago, and not by the officer against whom the petition is directed. If he failed and refused to certify them or any of them, he was clearly within his legal rights, for the petitioner could not present to him a lot of tickets — -some good, some bad, and some irregular — and put upon him the burden of separating the good from the bad; he being presumptively ignorant of the facts with respect to their issuance by his predecessors.-Hiscox v. Hendree, 27 Ala. 216; Gibson v. Hatchett & Bro., 24 Ala. 201. Before the petitioner could put the clerk in default or invoke the aid of the courts in the issuance of an extraordinary remedy of this nature, *518lie must present to him a number of tickets or certificates which are clearly, under the law, entitled to certification against the fine and forfeiture fund. As long as he presents some good, some irregular, and some bad, or leaves it, by his pleading, a matter of uncertainty and doubt as to whether he presented good and bad together, the clerk could not-, by mandamus, be required to certify the demands. “If the right is doubtful, mandamus is not proper.”—Kelly & Middleton v. Horsely, 147 Ala. 508, 511, 41 South. 902; High, Ex. Legal Rem. (3d Ed.) § 9, and authorities cited in note 4 on page 12.
It is not necessary to consider the other questions in the case, nor are we to be understood as passing upon the legality of the certificates not discussed, as a charge against the fine and forfeiture fund of Greene county, or as expressing any opinion on that question as it is entirely unnecessary to a determination of the case before us. The application was properly denied, and the judgment of the court below is affirmed.
Affirmed.