small database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
maninjapan
Forum Newbie
Posts: 1
Joined: Thu Apr 05, 2007 10:20 am

small database

Post by maninjapan »

Hi
i am trying to make a small basic database for a friend. However, I am stuck whereby I have to add three different materials for the paper, all of different percentages.

this is the first

table materials

material_code primary key
material_name


table products

products_code
products_name
products_mat1
products_mat1amt
products_mat2
products_mat2amt

however when i try to use the code to display the product_code, product_name, product_mat1 (as material_name)

it comes back as blank?

any ideas to help navigate this?

just trying to find code now.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Can you post the table structures and how they are supposed to interconnect? Post your query too.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

Do you have some test data entered in the tables?

As Feyd said, you have to tell us what your query looks like before we can determine what's wrong.
Post Reply