Witnesses shall receive for each day's attendance in all courts of record of this state the same compensation per day and per mile as jurors in superior court. Witnesses in any other court shall receive for each day's attendance the same compensation per day and per mile as jurors in district court.