After administering the oath the judge must issue an order that the prisoner be discharged from custody, and the officer, upon the service of such order, must discharge the prisoner forthwith, if he be imprisoned for no other cause.
Idaho Code § 8-207