I have three tables
product_color
===
color_id (primary)
color_initial
red
green
blue
school_art
===
id(primary)
art_loc
series_code
set_color
===
setcolors_id
school_art_id
color_id
What I would like to do is:
Get the red, green and blue from product_color table where the product_color.color_id = set_color.color_id
AND WHERE the set_color.school_art_id = school_art.id
This is what I have, but being that it is not working, clearly I am missing something. Any help would SOOO gratefully appreciated.
$colors =
"SELECT * FROM
product_color
JOIN
set_colors
ON
product_color.color_id = set_colors.color_id
WHERE
set_colors.school_art_id = '{$school_art_id}'";
$colorresult = mysql_query($colors) or die(mysql_error());
$returncolors = mysql_fetch_array($colorresult);