|
Posted by Ken Chau on 01/31/06 08:23
Well, that sounds like a classic case of normalized tables with a
foreign key pointing to a different table:
create table products (
id int primary key auto_increment,
product_number int
);
create table quantity_costs (
id int primary key auto_increment,
product_id int,
cost float,
quantity int
);
a simple query as below will get you your costs:
select * from products p, quantity_costs c where p.id = c.product_id;
------------
Ken Chau
http://www.gizzar.com
[Back to original message]
|