I am getting the following error from this query:
select sheet_items.sheet_id, sheet_items.quantity, materials.material, colors.color
from sheet_items, materials
inner join colors
on colors.color_id=sheet_items.color_id
where sheet_items.sheet_id=4 and sheet_items.material_id=materials.material_id
Any ideas? Thanks in advance!
The way you have it structured now, you are trying to inner join Materials with colors, therefore, it does not know what column you are talking about.. try
select sheet_items.sheet_id, sheet_items.quantity, materials.material, colors.color
from materials,sheet_items
inner join colors
on colors.color_id=sheet_items.color_id
where sheet_items.sheet_id=4 and sheet_items.material_id=materials.material_id