> THat displays EVERYTHING tho. I want it to display only the names that exists in the first query but does no exist in the second query.
My mistake:
<cfquery name="theQuery">
SELECT
i.name,
i.project_id,
j.name,
j.project_id
FROM (
SELECT name, project_id
FROM images
WHERE project_id = <cfqueryparam cfsqltype="cf_sql_integer"
value="#URL.firstID#">
) i LEFT JOIN
(
SELECT name, project_id
FROM images
WHERE project_id = <cfqueryparam cfsqltype="cf_sql_integer"
value="#URL.secondID#">
) j
ON i.name = j.name
WHERE
j.name IS NULL
</cfquery>
<cfoutput>#ValueList(theQuery.name)#</cfoutput>
Jochem
--
Who needs virtual reality
if you can just dream?
- Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

