Cfoutput issues
Here's the cfquery that I have. It combines 2 tables (orders and users) and outputs required info. The problem that I have is the following.
For example, John Smith ordered 1 CD and 1 Book. The way this info is being displayed is:
1.John Smith - 1 CD
2.John Smith - 1 Book
How do I combine all orders that John Smith placed on one line, so it looks like that:
John Smith - 1 CD, 1 Book.
<cfquery datasource="#DATASOURCE#" name="xml">
SELECT
orders.date_ordered, users.id, users.firstname, users.lastname,users.organization,users.address1,users.address2,users.city,
users.state,users.zipcode,users.country,users.phonenumber,users.email,users.mailcode,orders.Quantity,orders.itemName,orders.item_lang,orders.SKU,
orders.itemid, orders.userid,orders.item_lang
FROM orders
LEFT OUTER JOIN users
ON users.id = orders.userid
WHERE orders.userid = users.id
</cfquery>
<cfoutput query="xml">
<p><strong>#DateFormat(date_ordered, "mm/dd/yyyy")#</strong> -
#firstname#
#lastname# -
#Quantity#
#itemName# </p>
<hr />
</cfoutput>
