Quantcast
Channel: Adobe Community : All Content - ColdFusion
Viewing all articles
Browse latest Browse all 5979

How do I inner join 4 tables?

$
0
0

I have a page table that includes navigation IDs, catID, subcatID, I use an inner join for the tables.

Tables:

pages

categories

subcat

 

I have added subSubID for a third level on the nav menu. How do I add the fourth table to the cfquery?

 

I want to add: inner join subSubcat on pages.subSubID = subSubcat.subSubID to the table below.

 

<cfquery name="getPages" datasource="#application.database#">

select *

from (pages INNER JOIN catagories ON pages.cat_id = catagories.cat_id)

inner join subcat on pages.subID = subcat.subID

Where catagory = '#title#'

order by pages.subID asc, pages.ordID asc

</cfquery>


Viewing all articles
Browse latest Browse all 5979

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>