How to get ratings and comments associated with particular software tool

Hi, I am doing one project where owner can add software tools and user can download it. Also user can provide ratings for that tool. So I am working on rating. I have to display the tools with its associated ratings and comments. But for any particular tool  it’s showing me the comments and ratings of other tools also. so how to show the one particular tool with its associated rating and comment? I have attached the page which I have designed, which changes I have to done for getting the tools with its associated ratings and comments only.
1 answers

form that image, you are retrieving values form database not form associated object.