Switched from using fetch_row to fetch_assoc for pulling rows to make code easier to understand.