On Saturday, July 13, 2019, Karen Goh <
karenworld@yahoo.com> wrote:
String sql1 = "select tutor_id, subject_name from tutor_subject where subject_name in ("
+ builder.deleteCharAt(builder.length() - 1).toString() + ")";
PreparedStatement ps2 = connection.prepareStatement(sql1);
ps2.setInt(1, tutor_id);
ps2.setString(2, item);
I still don’t see any question marks and you don’t show what is in the builder but assuming the builder has two question marks they both go into the IN expression but then you are comparing subject_name to an integer tutor_id at param 1 which would provoke that error.
David J.