James B. Bergin, a plumbing contractor, filed a mandamus action for the purpose of compelling the Board of Plumbing Examiners of the City of Coral Gables, Florida, to reinstate his master plumber’s license which he claims had theretofore been revoked and cancelled by the Board without notice or hearing. The Board answered the alternative writ, admitting that the license had been revoked and cancelled without notice or hearing and averring that the license had been obtained through fraud and deceit, that the relator had never taken and satisfactorily passed the plumber’s examination required by the controlling city ordinance as a condition precedent to the issuance of a master plumber’s license, and that consequently the relator never became entitled to receive such a license in the first instance.
The relator moved for the issuance of a peremptory writ the return of the respondents notwithstanding. In an order denying the motion and dismissing the, cause the trial court found and adjudicated as follows:
“The issue before the Court as made by the pleadings is whether, under the provisions of section 12 of Ordinance No. 669 of the City of Coral Gables, relator is entitled to hearing before his license can be legally revoked by the respondents. The court finds as a matter of law that the respondents under the provisions of section 12 of Ordinance No. 669 are empowered -to revoke the relator’s license without notice *748and without a hearing. It is thereupon and in consideration thereof
“Ordered and Adjudged that the relator’s motion for peremptory writ notwithstanding the return be and the same is hereby denied and relator being willing to rest this case on the pleadings of said cause, be and the same is hereby dismissed and the alternative writ discharged. * * * ” (Emphasis supplied).
This appeal is from the order of dismissal.
The sections of Ordinance No. 669 of the City of Coral Gables which bear upon the question raised upon this appeal provide as follows:
“Section 10. Examinations — Licenses—’ Certificates of Competency. (a) Every contractor shall procure and maintain at all times while so engaged, a city license therefor as is provided for in. this ordinance. * * * (c) An examination for proficiency shall be required prior to the issuance of a certificate of competency, authorizing the person named therein to engage in or perform work within the City of Coral Gables, in any of the following classifications * * * (1) Master Plumber. * * *
“Section 11. Licenses: (a) In all classifications of contracting wherein an examination for proficiency is required -by Section 10 hereof, no contractors’ licenses shall -be issued to any individual until [he] shall have taken and satisfactorily passed the examination. * * . *
“Section 12. Pow.er of Board of Examiners: Each Board shall have the power, in addition to all other powers provided for in this Ordinance, to revoke,the certificate of any Master or Journeyman, and to invoke the license of any Contractor *. * * who shall be guilty of * * * (a) Fraud or deceit in obtaining a,license. ■* * * The Building, Plumbing or Electrical Inspectors of the City of Coral Gables, the Architect or Engineer who is responsible for the plans under which the contractor is working or any other person directly interested in the contract may prefer charges against a licensee under this Ordinance. Such charges must be made in writing and sworn to by the complainant and submitted to the proper Board. It will then be the duty of [the] Board * * * to investigate the charges * * * If the Board does not determine on preliminary investigation that the charges are unfounded or trivial, a public hearing shall be called and held upon such charges." * *' * A copy of the charges, together with the notice of the time and place of hearing, shall be served on the accused at least five (5) days before the date fixed for the hearing. * * * If, after the hearing, the Board’s decision shall be that the licensee has been guilty of the charges preferred against him, his license shall be suspended, cancelled or revoked * *
It will be noted that in the judgment appealed from the trial court found “that under the provisions of Section 12 of Ordinance No. 669 [the respondents] are empowered to revoke the relator’s license without notice and without 'a hearing.” Following this finding, -the decretal part of the order adjudged that the relator’s motion for peremptory writ should be denied and the cause dismissed.
While we have some difficulty in following the reasoning upon which the trial court bottomed its order dismissing the cause,- it is well established" that on an appeal from an ordér'of a trial court granting or denying relief in a particular cause’, the appellate court-will ordinarily look to that" which has -been done, father than to the specific reasons assigned therefor, in determining whether reversible error has been committed. Smith v. Croom, 7 Fla. 180; Adams v. American Agricultural Chemical Co., 78 Fla. 362, 82 So. 850; Baylarian v. Tunnicliffe, 105 Fla. 484, 141 So. 609, 144 So. 844; Perkins v. City of Coral Gables, Fla., 57 So.2d 663.
In the instant case the matter for final adjudication before the trial court was presented by a motion of the relator for the issuance of a peremptory writ not*749withstanding the return of the respondent. Under our decisions, “such a motion stands as the equivalent of a demurrer to a pleading in a law action. It operates as an admission by the relator of the truth of the facts well pleaded by the 'respondent but claims that in law the Return -presents no sufficient reason why the relief sought in the alternative writ should not be granted. * * * Such being its effect, the hearing on such a motion contemplates the - entry of a final order without the submission of evidence, either quashing or'dismissing the alternative writ or granting the peremptory writ to the extent that the prayer of the alternative writ is well founded”. State ex rel. Hawkins v. Board of Control of Florida, Fla., 47 So.2d 608, 611, and cases therein -cited. '
The original petition filed by .the relator in the instant cause averred that his license had -been revoked and cancelled without notice or hearing and concluded with a prayer for the issuance of an alternative writ commanding the Board to convene and reissue or reinstate the license theretofore issued to the relator. The alternative writ issued consequent upon the prayer commanded the Board to convene and issue to or reinstate the license of the relator or show cause for its failure so to do. The answer of the Board in response to the writ was in effect that the relator had never taken and satisfactorily passed the examination for proficiency which was required by the ordinance as a condition precedent to the issuance of such a license, and consequently that the issuance of the license in the first instance was entirely without authority. In legal effect, the relator admitted these facts to be true when he moved for the issuance of the peremptory writ and chose “to rest this case on the pleadings of said cause.”
By the pleadings there was presented to the trial court at that stage of the case the issue whether the license of the relator should be reinstated instanter and thereafter a hearing had before the Board on the issue of the revocation of a license which, by hi? :own admission, the relator never became lawfully entitled to receive in the first instance and which, under the controlling ordinance, the Board was never lawfully authorized to issue. Under these circumstances . it, cannot be said .that the trial court erred, in refusing tq give the r.elator a: hearing before the Board' on the issue as to why-his license should not be reinstated, even though, .in other circumstances and under another set of facts not. present in this case, he might have been entitled to such a hearing.
This is so for, the reason that a writ of mandamus will .not be, allowed ira a case of doubtful right; State v. Gray, 92 Fla. 1123, 111 So. 242; Permenter v. Younan, 159 Fla. 226, 31 So.2d 387; State ex rel. Norman v. Holmer, 160 Fla. 434, 35 So.2d 396. It will not issue to enforce a right which is conditional or incomplete by reason of th.e .failure of the relator to perfqrm conditions precedent-entitling,..him to the enforcement Of. the right. Lamb v. Harrison, 91 Fla. 927, 108 So. 671; Bourne v. Pentland, 143 Fla. 61, 196 So. 606; State ex rel. Hall v. Hildebrand, 124 Fla. 363, 168 So. 531. It will not lie. to compel the parties, against whom it is, directed t.o-do a vain or useless thing. Fidelity & Casualty Co. v. Magwood, 111 Fla. 190, 149 So. 29; McAlpin v. State, 155 Fla. 33, 19 So.2d 420; State ex rel. Walker v. Best, 121 Fla. 304, 163 So. 696. It will not issue in order to enable the person in whose behalf it is sought to effect or accomplish an illegal purpose. State ex rel. Edwards v. County Commissioners of Sumter Co., 22 Fla. 1. See also 34 Am.Jur., Mandamus, secs. 36, 37.
The judgment appealed from should be affirmed.
It is so ordered.
TERRELL, THOMAS, MATHEWS and DREW, JJ., concur. HOBSON, J., concurs specially. *750ROBERTS, C. J., dissents.