how to use an XML param in sql query within XML Package

rileywolf

New Member
i have an XML package and i call Product template from cattegory template which they are in the same XML Package file sending param in the calling \[code\]<xsl:apply-templates select="/root/Products/Product"><xsl:with-param name="CategoryID" select="$CategoryID"> </xsl:with-param></xsl:apply-templates>\[/code\]and i wanna use CategoryID on a SQL Query in the same XML Package File \[code\]<query name="Products" rowElementName="Product"> <sql> <![CDATA[ Select TOP 1 Product.ProductID, Product.Name, Product.SubTitle, Product.Description, Product.SEName, Product.Summary, ProductVariant.Price, CAST(ProductVariant.LEPrice AS decimal(10,2)) AS LEPrice, Product.AuthorPreText1, Product.AuthorFName1, Product.AuthorLName1, Product.AuthorPreText2, Product.AuthorFName2, Product.AuthorLName2, Product.AuthorPreText3, Product.AuthorFName3, Product.AuthorLName3, Product.CoAuthorPreText1, Product.CoAuthorFName1, Product.CoAuthorLName1, Product.CoAuthorPreText2, Product.CoAuthorFName2, Product.CoAuthorLName2, Product.CoAuthorPreText3, Product.CoAuthorFName3, Product.CoAuthorLName3 From Product, ProductVariant, ProductCategory, Category Where Status='Forthcoming' AND Product.ProductID = ProductVariant.ProductID AND Product.Deleted = 0 AND ProductCategory.CategoryID=@CategoryID AND Product.ProductID=ProductCategory.ProductID Order By Product.Name Asc ]]> </sql> <queryparam paramname="@CategoryID" paramtype="" sqlDataType="int" defvalue="http://stackoverflow.com/questions/10480166/0" validationpattern="" /></query>\[/code\]i donknow how to write the queryparam to see the correct CategoryID i send
 
Back
Top