Code: Select all
if(chunkExists){
String mySqlQuery = "SELECT chunkBuildings FROM chunks where chunkName = '"+chunkName+"'";
Connection connection;
connection = dbManager.getConnection();
PreparedStatement stmt = connection.prepareStatement(mySqlQuery);
ResultSet result = stmt.executeQuery();
if(result == null){
// Sends MySQL exception details to the client
sendISFSObject("ChunkDataCollector_Error","error", "Data receiving failed", user);
trace("<ChunkDataCollector : MySQL Error +"+lastException.getMessage()+">");
}
else{
String buildingsCollection = "";
if(result.next()){
buildingsCollection = result.getString("chunkBuildings");
trace("<ChunkDataCollector : "+buildingsCollection+">");
trace("<ChunkDataCollector : "+chunkName+">");
}
// Sends MySQL exception details to the client
sendISFSObject("ChunkDataCollector_Sucess", "sucess", buildingsCollection, user);
trace("<ChunkDataCollector : Data sucessfull received>");
}
connection.close();
}
As you may see i try to send the string "buildingsCollection" to the client. I also trace it but the value is always empty. I also have two other extensions which are working with my database ( login & registration ) i havent got those iusses there. Maybe those extensions have a problem with each other ?