Horizontal repeat region is working fine. My problem is this...
The first row is Team Lead. The second row starts with usernames assigned to that Team Lead.
The first part of the loop (and the horizontal repeat region) work fine to display the Team Leads. The nested repeat region within this loop for the second (and any other rows) are supposed to be generated based on people assigned to that Team Lead.
My table has two Team Leads and three Team Members. Two are assigned to the first Team Lead and the third is assigned to (you guessed it) the other Team Lead. It displays all three Team Members under the first Team Lead and "none available" under the second. I had put in some echos to display what data was being passed. How do I get the first/main loop for the first Team Lead to only display Team Members assigned to him, and the second Team Lead to display his Team Member(s)?
Team Lead________Team Lead
..Team Member__..Team Member
..Team Member__..Team Member
..Team Member_____..Team Member
Built in DW and sorry if the tabs are off from me copying and pasting.
<?php
$team_leads_endRow = 0;
$team_leads_columns = 4; // number of columns
$team_leads_hloopRow1 = 0; // first row flag
do {
if($team_leads_endRow == 0 && $team_leads_hloopRow1++ != 0) echo "<tr>";
?>
<td valign="top" width="25%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7%">
<input type="checkbox" name="username[]" value="<?php echo $row_team_leads['email']; ?>"/></td>
<td colspan="2"><span class="name_checklist"><?php echo $row_team_leads['last_name']; ?></span>, <span class="name_checklist"><?php echo $row_team_leads['first_name']; ?></span>
</td>
</tr>
<?php do { ?>
<tr>
<? $teamleads = $row_team_leads['username']; ?>
<? if ($teamleads = $row_users['assigned_to_team_lead'] ) { ; ?>
<td> </td>
<td width="7%">
<input type="checkbox" name="username[]" value="<?php echo $row_users['email']; ?>"/></td>
<td width="86%">
<? echo $teamleads; ?>
<?php echo $row_users['last_name']; ?>, <?php echo $row_users['first_name']; ?>
</td>
<? } else { ?>
<td> </td>
<td colspan="2"> <? echo $teamleads; ?>There are no Team Members assigned to this Team Lead
</td>
<? }; ?>
</tr>
<?php } while ($row_users = mysql_fetch_assoc($users)); ?>
</table>
</td>
<?php $team_leads_endRow++;
if($team_leads_endRow >= $team_leads_columns) {
?>
</tr>
<?php
$team_leads_endRow = 0;
}
} while ($row_team_leads = mysql_fetch_assoc($team_leads));
if($team_leads_endRow != 0) {
while ($team_leads_endRow < $team_leads_columns) {
echo("<td> </td>");
$team_leads_endRow++;
}
echo("</tr>");
}?>