hi, i need some simple help please
[nobr]Below is the current code for display and counting values in a table...
boolean learningstyle =false;
String lstyleresult ="";
RS=Stmt.executeQuery("select data from learningstyle where userid='"+sr_studentid+"' order by submitted desc,id desc");
if (RS.first())
{
learningstyle =true;
String data = RS.getString("data");
String[] arraydata = data.split(",");
String[] visualnos ={"4","6","8","12","13","17","22","24","25","29","33","35","37"};
String[] auditorynos ={"1","3","9","11","14","16","18","21","26","28","32","36","38"};
String[] doingnos ={"2","5","7","10","15","19","20","23","27","30","31","34","39"};
int vscore=0;
int ascore=0;
int kscore=0;
for (int i=0;i<visualnos.length;i++)
{
if(arraydata[Integer.parseInt(visualnos[i])-1].equals("Y"))
{
vscore++;
}
}
for (int i=0;i<auditorynos.length;i++)
{
if(arraydata[Integer.parseInt(auditorynos[i])-1].equals("Y"))
{
ascore++;
}
}
for (int i=0;i<doingnos.length;i++)
{
if(arraydata[Integer.parseInt(doingnos[i])-1].equals("Y"))
{
kscore++;
}
}
lstyleresult ="Visual: "+vscore+"/"+visualnos.length+"><br /><br />Audio: "+ascore+"/"+auditorynos.length+"<br /><br />Kinetic: "+kscore+"/"+doingnos.length;
}
else
{
learningstyle =false;
}
%>
I want the JSP code to run the query above OR run the query below:
RS=Stmt.executeQuery("select data from learningstyle where userid='"+sr_studentid+"' and input_type='manual' order by submitted desc,id desc");
How would i do this?[/nobr]

