with this code i have only fetched out the subjects and i need to fetch out value for the following too from the database…i have attached the template of what i want to achieve
- GRADE
- Contious Assessment:
- Exam Scores:
- Exam Scores
- Weighted Average:
- Last Term Cummulative:
- Cumulative (c+d)/2:
- Comment:
but now i can only get the foreach work for subject alone…
$l=mysql_query(“SELECT * FROM result WHERE school_id=’$id’ AND student_reg_id=’$st’”) or die (mysql_error());
if (mysql_num_rows($l) > 0)
{
while ($row = mysql_fetch_array($l))
{//
$pwrlist[$row[‘ajax_result_id’]]=$row[‘subject’];
//$
}
$numpwr = count($pwrlist);
$thresh = 3;
$maxcols = 18;
$cols = min($maxcols, (ceil(count($pwrlist)/$thresh)));
$percol = ceil(count($pwrlist)/$cols);
$powerchk = ‘’;
$i = 0;
foreach ($pwrlist as $id => $pwr)
{
if (($i>0) && ($i%$percol == 0))
{
$powerchk .= “\n
”;
}
$powerchk .= "
$pwr | GRADE: | B3 |
» (a) Contious Assessment: 80
» (b) Exam Scores: 90 » © Weighted Average: 168 » (d) Last Term Cummulative: 78 » (e) Cumulative (c+d)/2: 123 |
||
Comment: His is a responsible boy |
\n"; $i++; }
}