This solution will work IF you always have an entry in the fields
categories_tb.IDC and the number_tb.IDN Is that the case or is there occasion
where this is left blank.
If either of these fields are left blank they will not show up in your query
results.
If you want them to show up in your results simply replace the inner join with
a left outer join (The left outer join basically says still bring the info from
the categories table even if the field IDC is blank. So basically it will bring
all the same records as your inner join)
Make sense? Here's the change you'll want to make:
SELECT words_tb.word, words_tb.pronunciation,
meanings_tb.shortMeaning, categories_tb.category,
number_tb.number
FROM ((words_tb
INNER JOIN meanings_tb ON words_tb.word = meanings_tb.wordFK)
LEFT OUTER JOIN categories_tb ON categories_tb.IDC = meanings_tb.IDCFK)
LEFT OUTER JOIN number_tb ON number_tb.IDN = meanings_tb.IDNFK
WHERE words_tb.word = '#form.word#'
>Thanks, that worked. I had tried a few combinations before but could not
>just hit the right syntax. Here's the resulting code from DW (with
>parentheses for Access):
>
>SELECT words_tb.word, words_tb.pronunciation,
> meanings_tb.shortMeaning, categories_tb.category,
> number_tb.number
>FROM ((words_tb
> INNER JOIN meanings_tb ON words_tb.word = meanings_tb.wordFK)
> INNER JOIN categories_tb ON categories_tb.IDC = meanings_tb.IDCFK)
> INNER JOIN number_tb ON number_tb.IDN = meanings_tb.IDNFK
>WHERE words_tb.word = '#form.word#'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196780
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54