Hey guys..
can anyone explain to me why this:
produces a hashmap episodeID with a idEpisode as keys and the exact same hashmap (episodes) as value? why aren't the sub-hashmap (episodes) different from each other?
Mathias.
can anyone explain to me why this:
episodeID.clear();
pst3 = con.prepareStatement("SELECT idEpisode, c00, c01, c03, c04, c05, c13 FROM episode WHERE idShow='" + rs.getInt(1) + "' AND c12='" + rs2.getInt(1) + "'");
rs3 = pst3.executeQuery();
while (rs3.next()) {
episodes.put("c00", rs3.getString(2));
episodes.put("c01", rs3.getString(3));
episodes.put("c03", rs3.getInt(4));
episodes.put("c04", rs3.getString(5));
episodes.put("c05", rs3.getString(6));
episodes.put("c13", rs3.getInt(7));
episodeID.put(rs3.getInt(1), episodes);
}
produces a hashmap episodeID with a idEpisode as keys and the exact same hashmap (episodes) as value? why aren't the sub-hashmap (episodes) different from each other?
Mathias.