How can I Join on KidsData and Fruitdescription table to get Fruit Name from Fruitdescription table rather than hard coding it.
this is what I can get to this far.
Table: KidsData
Table: Fruitdescription
this is what I can get to this far.
Code:
<cfquery name="kidsData">
SELECT *
FROM KidsData K
LEFT JOIN Fruitdescription F ON F.ID = K.FruitData
WHERE FruitData IS NOT NULL AND ID = #ID#
</cfquery>
Table: KidsData
Code:
ID Name FruitData
1 Candy 100000
2 Andy 001000
3 Sarah 001010
4 Gabby NULL
5 Jack 000110
Code:
ID FruitName
0 apple
1 orange
2 kiwi
3 banana
4 pineapple
5 grape