bug fixes

Former-commit-id: a0194f04545aa33b13808ec570eedb1d92b127bf
This commit is contained in:
dcollin 2015-12-04 10:42:54 +01:00
parent 99e5b3a1f2
commit b6b82b47f8
2 changed files with 2 additions and 1 deletions

View file

@ -66,6 +66,7 @@ public class DataSynchronizationClient extends TimerTask implements HalDaemon{
data.data,
data.confidence));
}
logger.fine("Stored " + dataList.size() + " entries for sensor " + sensor.getId() + " from " + user.getName());
}
out.writeObject(null);
out.close();

View file

@ -33,7 +33,7 @@ public class Sensor extends DBBean{
}
public static List<Sensor> getSensors(DBConnection db, User user) throws SQLException{
PreparedStatement stmt = db.getPreparedStatement( "SELECT sensor.* FROM sensor,user WHERE user.id == "+ user.getId() );
PreparedStatement stmt = db.getPreparedStatement( "SELECT * FROM sensor WHERE user_id == " + user.getId() );
return DBConnection.exec(stmt, DBBeanSQLResultHandler.createList(Sensor.class, db) );
}