46-15-105. Persons imprisoned in state prison or in another county. When it is necessary to have a person imprisoned in the state prison brought before any court or a person imprisoned in a county jail brought before a court sitting in another county, an order for that purpose may be made by the court and executed by the sheriff of the county where it is made.