Forum Moderators: phranque
I am trying to display a table with mySQL data. The table should be divided into multiple sections, each representing a region. Under each region there should be the staff members who are responsible for each region. I have a table that contains the staff member's names and their region in one row.
In order to display the region and it's staff members I tried: "Select * FROM staff GROUP BY Region ORDER BY Region ASC"
This only returns one staff member per region. Where's the mistake?
thx
Dan
SELECT staff,region ORDER BY region,staff;
But if you want summary information you have to do that seperately in a temp table, or afterwards in teh client app.
SN
Region A
----------
Staff member 1
Staff member 2
Staff member 3
Region B
----------
Staff member 1
Staff member 2
etc.
But I have no idea how to set up a temporary table. I'm using PHP to retrieve/display the mysql results.
Dan