Skip to content
Advertisement

Showing multi row in one row

I am developing a page where I have to show all the jobs of an employee with a work number and the total of each type of hours in each work

I can display it, but, my problem is

when the employer works on the same job twice it displays the same job twice too

I have this:

I want this:

PHP CODE:

HTML CODE:

Advertisement

Answer

You want to use group by for the first column and sum group function on the hours

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement