Hi, Thanks in advance ....
I need a big help how to tranfer data in rows into column for example:
how to turn this table:
idStudent | Year | idSubject | idExam |idClass| mark | grade|
2005-0001 | 2005 | BI01 | AT | 1A | 98 | A |
2005-0001 | 2005 | BM01 | AT | 1A | 65 | C |
2005-0003 |2005 | BI01 | AT | 1A | 89 | A |
2005-0003| 2005 | BI01 | JAN | 1A | 56 | D |
into this display or output so i can display it?
idStudent | Year | BI01 | BM01 | idClass| idExam| Summark
2005-0001 | 2005 | 98 | 65 | 1A | AT | 98+65
2005-0003 |2005 | 89 | 56 | 1A | AT | 89+56
how do i set my query ???
$sql = "SELECT if(idSubject='BI01') AS BI01, if(idStudent='BM01') AS BM01 FROM result where ((idExam = 'AT') AND (idClass='1A'))
GROUP BY idSubject";
i have tried for a month and please somebody help me...tahnks again.. here is the table.... i include..or attach
result.sql in .zip file
thanks again...in advance please someone help me...I'm Stuck..