a <cfqueryparam> (with the appropriate cfsqltype) around the
URL.thisProduct should fix things up.

and/or you could wrap the var in a toString() ?


On 8/23/05, Sharon Creese <[EMAIL PROTECTED]> wrote:
> I just tried that and it did not work. I think what is happenning is that
> when the value is passed to the query it does not like the the - when the
> other parts of the string are numbers so it tries to do math though it is a
> string.
> 
> I am doing a query and then running another query against the first's
> results
> <cfquery name="getcatalog" datasource="#Request.App.datasource#">
> 
> SELECT
>   PC.CategoryID,
>   C.CategoryName,
>   PC.SubCatID,
>   PC.ProductID,
>   SC.SubCatName,
>   P.ProductName,
>   P.ShortDescription,
>   P.LongDescription,
>   P.Price,
>   P.SmallImage,
>   P.LargeImage,
>   P.Status,
>   P.Company,
> p.proddoc
> FROM ProductsCategories PC,Categories C,SubCategories SC,Products P
> WHERE  C.CategoryID = PC.CategoryID
> AND SC.SubCatID = PC.SubCatID
> AND  P.ProductID = PC.ProductID
> AND P.Status = 'Yes'
> ORDER BY P.ProductName;
> </cfquery>
> 
> <cfquery name="getProductDetail" dbtype="query">
> SELECT ProductID, ProductName, Price, LongDescription, LargeImage,Company
> FROM getCatalog
> WHERE ProductID = '#URL.thisProduct#'
> </cfquery>
> 
> This works with all product codes I pass exept ones previously described
> such as 123-567-78
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216131
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to