27-27-102. Issuance of writ. A writ of prohibition may be issued by the supreme court or the district court or any district judge to any lower tribunal or to a corporation, board, or person in all cases in which there is not a plain, speedy, and adequate remedy in the ordinary course of law. The writ is issued upon an affidavit on the application of the person beneficially interested.