Currently I have this wopping great SQL statement that outputs into
a STRING that builds up my data in a table. This works wonders.......
but it could be better.....how....well currently it outputs everything
so if a person has more than one skill I get their name along with their
different skill.
The ideal situation would be one name with all theit skills listed....
What form does my output need to take to achieve this....It feels
impossible to me.....i'm gonna have to do this another way arn't I.
It is possible if we are simply getting one person and their skills....but
multiple people with multiple skills....with each instance of a users name only occurring once followed by all their skills.
Here is the code I have so far.....
$SQL = "SELECT * FROM staff_table,ranking_table,skills_table,rank_levels
WHERE staff_table.location_id ='$location' AND ranking_table.staff_id=staff_table.staff_id AND skills_table.skill_id=ranking_table.skill_id AND rank_levels.ranking_id=ranking_table.ranking_id";
while ($row = mysql_fetch_array($MySQLQuery)) {
$string_content .= "<TR><TD bgcolor='#999999' class='formtitletxt'>".$row['forename']." ".$row['surname']."</TD>";
$string_content .= "<TD bgcolor='#999999' align='right'><a href='../Admin/staff_details.php?id=".$row['staff_id']."'>More Details</a></TD></TR>";
$string_content .= "<TR valign='top'><TD bgcolor='#FFFFFF' class='formtitletxt'>".$row['skill']."</TD>";
$string_content .= "<TD class='whitetxt' bgcolor='#FFFFFF'>".$row['description']."</TD></TR>";
$string_content .= "<TR><TD height='10'> </TD>";
$string_content .= "<TD height='10'> </TD></TR>";
}
Thanks in advance
Matt