giles, I think you'll either need to amend your SQL to select just the booknumbers for that one ordernumber, or use a combination of cfloop and cfquery methinks.
Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:duncan.cumming@;alienationdesign.co.uk Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- "Giles Roadnight" <giles.roadnight@goldcockerelbo To: <[EMAIL PROTECTED]> oks.co.uk> cc: Subject: [ cf-dev ] Maxrows and grouping 11/04/02 04:09 PM Please respond to dev Hi guys. I have this code: <cfoutput query="getInvoicesReturn" group="ordernumber"> <h2>#ordernumber#</h2> <cfoutput> #booknumber# </cfoutput> </cfoutput> That gives me this output: 5182 1 2 3 4 5 17 18 6 7 8 9 10 11 12 5183 1 2 3 4 5 17 18 6 7 8 9 10 11 12 This is all well and good but I want to output only the first order so this code: <cfoutput query="getInvoicesReturn" group="ordernumber" maxrows="1"> <h2>#ordernumber#</h2> <cfoutput> #booknumber# </cfoutput> </cfoutput> gives me this output: 5182 1 How can I get it to only give me the first order? I am sure I have got this to work before but I can't remember how. I could do it with IF's of course - only outputting the line if the order number is the same as the last one but I would rather do it another way if possible. Giles Roadnight http://giles.roadnight.name -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
