cagcak / uims

University Information Management System
2 stars 0 forks source link

JSONArray doesn't put any row after first one. #2

Closed cagcak closed 10 years ago

cagcak commented 10 years ago

A sample SQL query: SELECT USERS.idnumber, SUCCESS_REPORT.subject_name, SUCCESS_REPORT.hours, SUCCESS_REPORT.midterm, SUCCESS_REPORT.final, SUCCESS_REPORT.average, SUCCESS_REPORT.attandance, SUCCESS_REPORT.semester, SUCCESS_REPORT.academic_year FROM USERS INNER JOIN SUCCESS_REPORT ON USERS.iduser=SUCCESS_REPORT.USERS_iduser WHERE USERS.idnumber= '09010102234';

returns a result like below:

idnumber subject_name hours midterm final average attandance semester academic_year 09010102234 Information Technologies 3 0 0 0 0 spring 2013-2014 09010102234 Conflict Management 3 0 0 0 0 spring 2013-2014

So there are two different records. But only the first one is converted into the JSONArray as shown below:

JSONArray form: [["Information Technologies","3","0","0","0","0","spring","2013-2014"]]

cagcak commented 10 years ago

Solved:

http://stackoverflow.com/questions/22522340/using-same-resultset-for-every-row-inside-jsonarray/22522381#22522381