(a) Every account for attendance of a witness shall be sworn to and shall state that he or she was summoned to attend as a witness in the cause upon which the charge is made, shall state the number of days he or she attended, and, if the witness was summoned outside the limits of the county in which he or she resides, shall state the number of miles he or she traveled in consequence of the summons.
(b) Every witness shall prove his or her attendance before any court, whether the case is determined or not, before the clerk of the court before which he or she may be summoned to appear.