How about something like this:

<CFQUERY name="get_chars" datasource="whatever">
    SELECT *
    FROM characters
    ORDER BY UserID, ParentID, CharID
</CFQUERY>

<CFSET CurrentUser = "">
<CFSET ParentFlag = 0>

<CFLOOP QUERY="get_chars">
    <CFIF Get_Chars.UserID NEQ CurrentUser>
        <BR><BR>
        <CFOUTPUT>User #Get_Chars.UserID#</CFOUTPUT>
        <CFSET ParentFlag = 1>
    <CFELSEIF ParentFlag EQ 1>
        <BR>
        <CFOUTPUT>
            Parent character
            (parentID=#Get_Chars.ParentID#,
            charID=#Get_Chars.CharID#,
            userID==#Get_Chars.UserID#)
        </CFOUTPUT>
        <CFSET ParentFlag = 0>
    <CFELSE>
        <BR>
        <CFOUTPUT>
            -Child character
            (parentID=#Get_Chars.ParentID#,
            charID=#Get_Chars.CharID#,
            userID==#Get_Chars.UserID#)
        </CFOUTPUT>
    </CFIF>
</CFLOOP>

... as I said... 'something' like that. I'm not guarranteeing it'll work but
you never know.

Taz


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to