// First delete the associated stats
conn.SQLUpdate("DELETE FROM general_stats "
+ "USING versions,general_stats " + "WHERE versions.project = "
+ id + " AND general_stats.version = versions.id");
conn.SQLUpdate("DELETE FROM test_stats " + "USING versions,test_stats "
+ "WHERE versions.project = " + id
+ " AND test_stats.version = versions.id");
conn.SQLUpdate("DELETE FROM findbugs_stats "
+ "USING versions,findbugs_stats "