SQL query help
Afternoon folks,
I have a query that pulls all the content out of a cms, for each site.
SELECT *
FROM sites
LEFT JOIN pages
ON sites.siteid=pages.siteid
LEFT JOIN forum
ON sites.siteid=forum.siteid
ORDER BY sites.sitename, sites.siteid, pageorder ASC
I'd like to display a link if the siteid exists in the forum table.
Can anyone please tell me how I can check for this?
So far I have below, but nothing shows up:
<cfoutput query="getcms" group="siteid">
<cfif isdefined("forum.siteid")>
show link to forum
</cfif>
</cfoutput>
Thanks in advance