something like:

[note: something quick before my first cup of Lao Mountain Coffee...
beware...]

<cfquery name="q1" ...>
SELECT p.product_id, p.stock_level, ptop.product_options_id,
ptop.stock_level AS o_stock_level, po.product_option_title
FROM products p LEFT JOIN (product_options po INNER JOIN
product_to_product_options ptop ON po.product_options_id =
ptop.product_options_id) ON p.product_id = ptop.product_id
ORDER BY p.product_id
</cfquery>

<cfoutput query="q1" goup="product_id">
#product_id#
<cfif listlen(arraytolist(q1.o_stock_level, ','), ',') gt 0>
    <cfoutput>
    #product_option_title# : <cfif o_stock_level gt 0>in
stock<cfelse>sorry, out of stock</cfif>
    </cfoutput>
<cfelse>
    <cfif stock_level gt 0>#stock_level# in stock<cfelse>sorry, out of
stock</cfif>
</cfif>
</cfoutput>


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Mike Little wrote:
> good question, at this stage being able to display all with like you said - a 
> availability flag would be quite good.
>
>   
>> do you want to display on your summary page only products that are in
>> stock, or all products with 'unavailable' for those out of stock?
>>
>> Azadi Saryev
>> Sabai-dee.com
>> http://www.sabai-dee.com/
>>
>>
>>
>> Mike Little wrote:
>>     
>>> i need to develop a system for displaying products on a summary page.
>>>
>>>
>>>       
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:302400
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