In other words
<cfquery name="showArticle" datasource="user020">
SELECT A.*, Au.authorID, Au.authorFirstName, A,authorSurname
FROM Articles A
JOIN Authors Au ON (Au.AuthorID = A.AuthorID)
WHERE A. articleID = '#url.updateID#
</cfquery>
Now you get authors * articles on records back. No problem with that.
<cfset stArticles = structNew()>
<cfloop query="showArticle">
<!--- create first time structure for this specific article --->
<cfif NOT structKeyExists(stArticles,"art_"&articleID)>
<cfset stArticles["art_"&articleID] = arrayNew(1)>
</cfif>
<!--- add this author to the structure for this article --->
<cfset arrayAppend(stArticles["art_"&articleID],authorID)>
</cfloop>
something like that .. now you can output all data with cfloop
collection for example :) You make the calls.
Micha Schopman
Software Engineer
Modern Media, Databankweg 12 M, 3821 AL Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183845
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54