When a cause shall be continued on account of the absence of a witness, duly summoned, and the party for whom such witness shall have been summoned shall make affidavit that such absent witness is material, and that he cannot safely go to trial without his testimony, the court may award a writ of attachment, directed to the sheriff or other proper officer of the proper county, commanding him to take the body of such witness, that he appear and testify in the cause at the next term thereafter; and the clerk shall issue such writ accordingly, stating therein the day on which the cause is set for trial, as the day of his appearance.
§ 491.160, RSMo