i have a 2 part code. the first part of the code tells me the number of records in a table based on the situation, the second part of the code pulls and displays the actual record information. In the Below code, it displays the correct record count with is 3, but when it tries to pull the information to display it, it only shows 1 record.
$depcourselist=mysql_query("select * from organization_dep_courses odc left join course c on odc.courseid=c.id where orgid=$orgid and depid=$departmentid");
echo '<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr bgcolor="#eaeaea" height="40">
<th align="left">Course Catalog<span>('.$countdepcourses.')</span></th>
</tr>';
while($courselist=mysql_fetch_array($depcourselist) )
$coursename = $courselist['fullname'];
{
if($coursecolor==1)
{
echo "<tr bgcolor='#f1f1f1' width='100%' height='25'>
<td align='left'>".$coursename."<a href='#'><img src='".$remove."' /></a></td>
</tr>";
$coursecolor="2";
}
else
{
echo '<tr bgcolor="#ffffff" height="25">
<td align="left">'.$coursename.'<a href="#"><img src="'.$remove.'" /></a></td>
</tr>';
$coursecolor="1";
}
}
echo '</table>';
any help spotting out what's causing the records to not display properly is always much appreciated.