Use fetch_assoc instead of fetch_array

Since numeric indices are not used, it is not necessary to get them from fetch_array.