This question for cold fusion programmer, and possibly I will be asked incorrectly because it is an open question and in fact Can not be answered, Cause u and I will be in the abs of inf about it :) But still I have only one point or guess, so that I can understand my goal and move on.
So here's the question: I have a cold production production script
Where some products are displayed, and all they need is sorting them by property, for example
is_purchase whose value is 0 or 1, plus my Has a checkbox beside it:
& lt; Input type = "checkbox" name = "is_purchase_stock" value = "1" & lt; Cfif isdefined ("attributes.is_purchase_stock") & gt; Check & lt; / Cfif> OnClick = "sayfalama.submit ();" & Gt;
In fact, there are such functions (is_saleable_stock), you can see it with products from all the pages of the whole page:
Thank you all!
You want to:
& lt; Cfquery data source = "#DSN2 #" & gt; SELECT * from the product PRODUCT_ID = # PRODUCT_ID # ORDER BY_purchase & lt; Cfif StructKeyExists (attributes, "is_purchase_stock") & gt; ASC & lt; Cfselse & gt; DESC & lt; / Cfif> & Lt; / Cfquery & gt; Edit. This is the answer to the question in a comment:
& lt; Cfquery data source = "# dsn2 #" & gt; SELECT * PRODUCT_ID = # PRODUCT_ID # and is_purchase = & lt; Cfif StructKeyExists (attributes, "is_purchase_stock") & gt; 1 & lt; Cfselse & gt; 0 & lt; / Cfif> & Lt; / Cfquery & gt;
Comments
Post a Comment