I've created a query that parses data to a template with one function (get_stu_analysis). The data within is set in a foreach loop as it relates to the specific conditions met.
Not all columns are set by this one function, so I have created another function (get_stu_data) that will grab hour and dollar amounts in relation to the same conditions as the previous function.
However, for each result it will only display the first row of data that the function(get_bill_data) provides.
For example: (the hours/amt is incorrect)
Last_name First_name School Hours Amount
Williams John VCU 10 541.1
Loo Cindy UCLA 10 541.1
Cobain Kurt VT 10 541.1
What it should be:
Last_name First_name School Hours Amount
Williams John VCU 10 541.1
Loo Cindy UCLA 15 760.5
Cobain Kurt VT 3 112.3