the following being my query...
am i trying to do too much with one query?
<cfquery name="getProduct" datasource="#variables.dsn#"
password="#variables.DBpassword#" username="#variables.DBusername#">
SELECT product.*, product_description.*, product_options.*,
categories_description.cat_title
FROM product
INNER JOIN product_description ON product.product_id =
product_description.product_id
INNER JOIN categories ON product.cat_id = categories.cat_id
INNER JOIN categories_description ON categories.cat_id =
categories_description.cat_id
LEFT OUTER JOIN artist ON product.artist_id = artist.artist_id
LEFT OUTER JOIN product_to_product_options ON
product.product_id = product_to_product_options.product_id
LEFT OUTER JOIN product_options ON
product_to_product_options.product_options_id =
product_options.product_options_id
WHERE 1=1
<cfif isDefined("arguments.product_id")>
AND product.product_id = <cfqueryparam
cfsqltype="cf_sql_integer" value="#arguments.product_id#">
</cfif>
<cfif isDefined("arguments.cat_id")>
AND product.cat_id = <cfqueryparam
cfsqltype="cf_sql_integer" value="#arguments.cat_id#">
</cfif>
ORDER BY #arguments.order_key#
</cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302306
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4