|
$row[name]
|
";
while ($termno < "7") {
$x = false;
echo "
";
//term 1 - main stuff
$sql2 = "SELECT * FROM school_plan_resource WHERE sid = '$row[sid]' AND yid = '$yearid' AND tid = '$termno'";
$result2 = mysql_query($sql2) or die(mysql_error());
while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) {
echo"
|
$sql2
|
|
$row2[name]
|
";
$x = true;
};
//term 1 - where subject is CC1
$sql3 = "SELECT * FROM school_plan_resource WHERE cc1 = '$row[sid]' AND yid = '$yearid' AND tid = '$termno'";
$result3 = mysql_query($sql3) or die(mysql_error());
while ($row3 = mysql_fetch_array($result3, MYSQL_ASSOC)) {
echo"
CC Link - $sql3
$row3[name]
|
|
$row3[text]
|
";
$x = true;
};
//term 1 - where subject is CC2
$sql4 = "SELECT * FROM school_plan_resource WHERE cc2 = '$row[sid]' AND yid = '$yearid' AND tid = '$termno'";
$result4 = mysql_query($sql4) or die(mysql_error());
while ($row4 = mysql_fetch_array($result4, MYSQL_ASSOC)) {
echo"
CC Link - $sql4
$row4[name]
|
|
$row4[text]
|
";
$x = true;
};
if ($x == false)
{
//if there is nothing in this cell
echo " | ";
}
echo "
| ";
$termno++;
};
echo"
";
};
echo"