Sorry about that subject. I don't know how to explain that succinctly...
 
The two tabes in our database I'm dealing with are ardetail and arhistory.
arhistory contains invoice information while ardetail has order information.
There can be multiple orders per invoice. These are my queries:
 
<cfquery name="arhistory" datasource="AR">
SELECT DISTINCT id, invoice, po, stat, total, idate, bal_due
FROM "ARHistory"
WHERE id = '#cookie.id#' 
ORDER BY invoice DESC
</cfquery>
 
<cfquery name="ardetail" datasource="AR">
SELECT acct, mainline, invoice
FROM "ARDetail"
WHERE acct = '#cookie.id#' AND invoice = '#arhistory.invoice#'
</cfquery>

I have the ardetail query inside a <cfoutput> so that it pulls the
mainline(s) for each invoice as it's printed to screen.
 
I would like to be able to list all the mainlines associated with each
invoice but I'm not sure how to go about it.
 
I'm assuming that the query is pulling all the mainlines if the invoices
numbers in both tables match.

I just realized that we've got this:

<cfset MaxRows_arhistory=25>
<cfset
StartRow_arhistory=Min((PageNum_arhistory-1)*MaxRows_arhistory+1,Max(arhisto
ry.RecordCount,1))>
<cfset
EndRow_arhistory=Min(StartRow_arhistory+MaxRows_arhistory-1,arhistory.Record
Count)>
<cfset
TotalPages_arhistory=Ceiling(arhistory.RecordCount/MaxRows_arhistory)>
<cfset QueryString_arhistory=Iif(CGI.QUERY_STRING NEQ
"",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset
tempPos=ListContainsNoCase(QueryString_arhistory,"PageNum_arhistory=","&")>
<cfif tempPos NEQ 0>
  <cfset
QueryString_arhistory=ListDeleteAt(QueryString_arhistory,tempPos,"&")>
</cfif>

to limit each page to 25 invoices and display multiple pages. I'm gonna need
something similar in order to get the multiple mainlines, aren't I? That's
gonna suck... I don't know what hardly any of that mess means... still new
to CF.

Anyone have some wisdom to share?
 
Thanks,
 
Mike



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285608
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to