<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ZenCart Orders Total Weight Query</title>
	<atom:link href="http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/feed/" rel="self" type="application/rss+xml" />
	<link>http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/</link>
	<description>code / ecommerce / life</description>
	<lastBuildDate>Fri, 07 May 2010 21:24:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-RC3</generator>
	<item>
		<title>By: damonp</title>
		<link>http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/#comment-25860</link>
		<dc:creator>damonp</dc:creator>
		<pubDate>Mon, 03 Dec 2007 16:10:31 +0000</pubDate>
		<guid isPermaLink="false">http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/#comment-25860</guid>
		<description>Good catch!

I updated the original query to avoid confusion.</description>
		<content:encoded><![CDATA[<p>Good catch!</p>
<p>I updated the original query to avoid confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mo</title>
		<link>http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/#comment-25858</link>
		<dc:creator>mo</dc:creator>
		<pubDate>Sun, 02 Dec 2007 17:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://damonparker.org/blog/2006/11/29/zencart-orders-total-weight-query/#comment-25858</guid>
		<description>your query does not count more than 1 items of the same products
more accurate query should be sth like this:

SELECT op.products_quantity*sum(p.products_weight)
FROM products p JOIN orders_products op
WHERE p.products_id IN (SELECT products_id FROM orders_products WHERE orders_id = &#039;ORDER_ID&#039;)
AND op.orders_id = &#039;ORDER_ID&#039;</description>
		<content:encoded><![CDATA[<p>your query does not count more than 1 items of the same products<br />
more accurate query should be sth like this:</p>
<p>SELECT op.products_quantity*sum(p.products_weight)<br />
FROM products p JOIN orders_products op<br />
WHERE p.products_id IN (SELECT products_id FROM orders_products WHERE orders_id = &#8216;ORDER_ID&#8217;)<br />
AND op.orders_id = &#8216;ORDER_ID&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using xcache
Page Caching using xcache
Database Caching 11/22 queries in 0.078 seconds using xcache
Content Delivery Network via cdn.damonparker.org/q9i5a4w8/cds

Served from: damonparker.org @ 2010-07-30 14:08:09 -->