[OA] Report Card - View Subject Marks

Les Richardson les at celery.richtech.ca
Thu Feb 16 10:40:43 EST 2006


Hi Methodius,

Updated in the 1.97 release code...

Thanks!

Les

On Wed, 15 Feb 2006, Methodius Dusyk - Central Office wrote:

> Hi
>
> On the Report Card page, View Subject Marks (All) gives a Table of Grades.
> When selecting a grade I get.
>
> [ Main | Report Card ]You have an error in your SQL syntax. Check the manual
> that corresponds to your MySQL server version for the right syntax to use near
> '.teacher, subject.description from subject,eval
>
>
> The problem is in the code in rptsummark1.pl.
>
> # IF by Grade or just ONE.
> if ($arr{grade}){ # We are doing one grade
>    if ($arr{grade} eq 'All'){
>        $sth = $dbh->prepare("select distinct subject.subjsec,
>         subject.grade,subject.teacher, subject.description
>         from subject,eval
>         where subject.subjsec = eval.subjcode and
>         eval.term = '$term'
>         order by subject.grade, subject.teacher, subject.description");
>    } else {
>        $sth = $dbh->prepare("select distinct subjsec
>         subject.teacher, subject.description
>         from subject,eval
>         where subject.subjsec = eval.subjcode and
>         eval.term = '$term' and
>         subject.grade = '$arr{grade}'
>         order by subject.description, subject.teacher");
>    }
>    $sth->execute;
>    if ($DBI::errstr) { print $DBI::errstr; die; }
>    $subjectrows = $sth->rows;
>    for (1..$subjectrows){
>        my ($subjsec, $gr,$tch,$desc)  = $sth->fetchrow;
>        push @subary,$subjsec;
>    }
> }
>
>
> A comma is needed after the
> $sth = $dbh->prepare("select distinct subjsec
>
> statement in the else section.
>
> Metodius
> _______________________________________________
> Openadmin mailing list
> Openadmin at pananix.com
> https://www.pananix.com/cgi-bin/mailman/listinfo/openadmin
>


More information about the Openadmin mailing list