So what your basically tell me is that i have to arrange my database in a way i can address the parts of it
Not really. What I am saying is that seeing the code that produces the result won't help you if you don't have some basic knowledge of programming, database access, database design, etc. No-one can give you an example of "how the products are gathered from the database". You need to first choose a programming language, and then learn how to access a database from within that language. The solution will almost certainly involve SQL, but that's only part of the story. And then it's up to you to design the database and write the code.