Given, J.
I. The single question to be determined is whether the witness J. P. Willis is entitled to mileage for more than one mile; and, if so, whether from his home in Dakota, or from the state line. Code, section 3814 provides a fee for each day’s attendance, and “mileage for actual travel per mile, each way, five cents,” and that, “ in criminal cases, where the defendant is adjudged not guilty, the fees above provided for attending a district court or justice’s court shall be paid by the county upon a certificate of the clerk or justice.” Some such provision is necessary to secure to parties *328accused of crime a fair trial, and to witnesses who are compelled to attend and testify compensation for the time spent and expenses incurred in obeying the process of the court. It is a notorious fact that while the law stood thus these provisions were greatly abused; witnesses being subpoenaed upon the slightest pretext, and without knowing whether they were material or not, and in some cases defenses even going so far as to try to deter prosecution, and force a dismissal, by subpoenaing an extraordinary number of witnesses, and creating unnecessary expenses. To prevent such abuses, the Eighteenth General Assembly enacted, as found in Laws of 1880, chapter 207 (section 5095, McClain’s Code), that “in no criminal case shall witnesses for the defense be subpoenaed at the expense of the county, except upon order of the court or judge before whom the case is pending; then only upon a' satisfactory showing that the witnesses are material and-necessary for the defense.” While some discretion is necessarily left to the courts as to the taxation of costs, including witness fees, this discretion should not be exercised so as to encourage or open the way to abuses. Fees and mileage are paid to witnesses because, in obedience to the command of the court, they have given their time and incurred expenses in attendance and travel. It is clearly not the purpose of the law to compensate for time and travel beyond that given in obedience to the command of the court. A witness attending under subpoena gets pay for miles actually traveled, and days of attendance only. Persons present in court may be called as witnesses without subpoena, and from the time of being so called are as much subject to the order of the court as if they had been subpoenaed, and are entitled to per diem for each day they are in attendance under orders of the court; but such witnesses are not entitled to any mileage, for they have not actually traveled even a fraction of a mile in obedience to the command of the court. Of course, witnesses called in open court, without subpoena, have the same right, in proper *329cases, to demand their fees that they would have had upon being served with subpoena.
Applying this view of the law to this case, it would follow that the witness J. P. Willis is not entitled to any mileage. It must be noticed, however, that the court had made an order for a subpcena of defendant’s witnesses, including the said J. P. Willis, and that he had attended at request of defendant’s attorney, without subpcena. The order of the court granting the defendant authority to subpoena witnesses is not in any sense an order or request of the court to such witnesses to attend. It does occur that, after taking such orders, it is ascertained that witnesses named therein are not material, and therefore not subpoenaed. It will not do to say that any witness, knowing himself to be named in such order, may by reason thereof attend and recover the same fees and mileage as if he had been subpoenaed. The request of counsel, based upon the order, was in no sense a command or request from the court.
None of the cases heretofore presented to this court involved the precise question under consideration, and all of them except Westfall v. Madison Co., 62 Iowa, 427, are so entirely different as not to be in point. In Westfall v. Madison Co., the witness was served with subpoena at Pittsburgh, Pennsylvania, to appear, and did appear, as a witness on behalf of the state, and this court held that he was entitled to mileage from Pittsburgh for the reason that, when one person performs services at the request of another, he is entitled to compensation from the latter; that the subpoena was a request from the state for the witness to travel and attend, which request was justified by the fact that the state could not avail itself of the testimony of this witness except by his personal presence. The court says : “ We think public policy, and the due and proper administration of the criminal law, • demand that such should be the rule. * * * To prevent failures of justice, the attendance of witnesses in such cases should, *330at least, be so far encouraged as to require the state and counties to pay them a reasonable compensation when they voluntarily, but at the request of the state, come here for the purpose of testifying on the part of the state in criminal actions.” The reason for this ruling is entirely wanting in the case under consideration. In that, the state could not avail itself of the testimony of the witness, except by his personal presence; in this, the defendant could have availed himself of the testimony of his father by deposition. It is argued that his personal presence was preferable. It is true that the manner and appearance of the witness sometimes adds weight to the testimony that is lost when presented through deposition; but it is also true that whatever may be in appearance and manner to detract from the weight of the testimony is gained by presenting it in deposition. Our conclusion is that, in such a case as that stated in the certificate of the trial judge, the witness is entitled to have costs taxed against the county for the days of his attendance only, and that he is not entitled to any mileage. The judgment of the district court is therefore Reversed.