Does it have that problem when you view the page directly outside of the framework?
The code looks correct. Are you sure that there aren't that many products with the same name? That seems to be the most likely cause is repeated column names in the database and nothing to do with framework or even the code itself not working properly.
What query are you using? Have you tried running that query in your database phpmyadmin and see if there are actually multiple products with the same name. Maybe use a SELECT DISTINCT productname query.