array_sum counting all records in result query not each row individually
问题 pulling hair out now I have a query that counts all relevant $price values in the array Basically the initial query checks the table to jobs that are completed but not invoiced The second query ( inside the initial query loop ) gets all the items that need adding up ( these values are found inside another table ( workshop-items ) and are checked against the $item array values the total is being calculated ok , i think it has something to do with where the $total is placed as its adding up ALL