Anonymous
public text v1 · immutable/**
* Check if an image already is added to a collection
*
* @param iid image id
* @param cid collection id
* @return Boolean
*/
public Boolean imageTaggedToCollectionExists(int iid, int cid) {
String sql = "SELECT FROM " + getTagTable() + " WHERE imageid = '" + iid + "' AND collectionid = '" + cid + "'";
try {
ResultSet rs = select(sql);
if(rs.next()) {
rs.close();
return true;
}
rs.close();
return false;
}catch (SQLException e) {
e.printStackTrace();
return false;
}
}