Every witness summoned before a judge of the court of general sessions is entitled to fifty cents (50¢) for each day’s attendance; and when summoned to attend in another county from that of the witness’ own, shall be entitled to five cents (5¢) per mile for every mile in going to and returning from the county, and all necessary tolls and ferriage.