I've modified a query to obtain the id numbers of the events associated with
the userID:
<cfquery name="getPastEvents" datasource="myDSN">
SELECT DISTINCT(events.id) as eventID, events.date FROM events,
eventAttendance, client
where client.clientID = <cfqueryparam value="#cookie.userid#"
cfsqltype="cf_sql_integer">
and client.clientID = eventAttendance.clientID
and eventAttendance.eventID = events.ID
and events.date < #now()#
order by events.date desc
</cfquery>
This returns a list of events. I then set the query to a variable:
<cfset eventID = #getPastEvents#>
Then create another query to obtain the documents related to the eventIDs in
the list:
<cfquery name="getDocs" datasource="myDSN2">
SELECT event
FROM documents where event like #eventID#
</cfquery>
The error produced states: Complex object types cannot be converted to simple
values.
Is this wrong way to create a query of a query? Is it erroring because I'm
comparing a single event to a list of events? Does it have anything to do with
two dsns?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4421
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15