You were using INNER JOIN in your SQL statement, which won't return a result if the joined tables don't have a matching value. I changed it to use a LEFT JOIN instead so that I could see the result. It appears the issue is that the prodtype table doesn't have the ID from the product table listed in it and that is why the result wasn't showing.