Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Just remember that you have to specify in your group by clause every columns you use in the select output.
In your case, it would be something like this:
PHP Code:
$query=<<<SQL SELECT d.Code,d.PFinal, d.FFinal, sum(d.Grade),d.TeacherName, t.Description,d.Day, d.room, d.time, t.Subject, t.Number, t.Units FROM D03Registrar d LEFT JOIN tablenewA3 t ON d.Code = t.CurCode WHERE SerialNumber = {$serial} AND RegistrationNumber = '{$_GET['regno']}' GROUP BY d.Code,d.PFinal, d.FFinal, d.Grade,d.TeacherName, t.Description,d.Day, d.room, d.time,t.Subject, t.Number, t.Units SQL;
__________________
Only a biker knows why a dog sticks his head out the window.
|