- con = getPooledCon();
- // should be a preparedStatement because is faster
- stmt = con.createStatement();
- ResultSet rs = executeSql(stmt,select);
- if (rs!=null) {
- String topicSelect= "id IN (";
- boolean first=true;
- while (rs.next()) {
- if (first==false) topicSelect+=",";
- topicSelect += rs.getString(1);
- first=false;
- }
- topicSelect+=")";
- if (first==false)
- returnList = DatabaseContent.getInstance().selectByWhereClause(topicSelect,-1);
- }
+ Vector extraTables = new Vector();
+ extraTables.add(theTable+" cxt");
+ returnList = DatabaseContent.getInstance()
+ .selectByWhereClauseWithExtraTables("c",extraTables,
+ "c.id=cxt.content_id and cxt.topic_id="+id );