Welcome Guest, Not a member yet? Register   Sign In
Need help with data arrays


Got two tables, Staff and Events. For a view, I need to get all the Staff records and, for each record, get a SUM of all the related (by Staffid) amount fields in Events.

What I'd like is to have all the data from each record in Staff and the SUM total in the same array ...I just can't figure out a way to do that.

Here's what I've got so far ... get all the Staff data and do a foreach loop to call a method to get the SUM total... but how to marry the two together???

betflix joker

you need to have some kind of identifier
Stack: Java, PHP, Javascript, HTML, CSS, MYSQL
keywords: laravel, codeigniter, autocad, git, filezilla, visual studio code.

Theme © iAndrew 2016 - Forum software by © MyBB