ColdFusion Parameterizing a Query

后端 未结 3 627
生来不讨喜
生来不讨喜 2020-11-29 13:56

I have a query that I run to populate a CFChart that I am trying to parametrize:


    SELECT *
             


        
3条回答
  •  生来不讨喜
    2020-11-29 14:50

    Your best bet it to parameterize every variable dropped into your query.

    Include the cfsqltype as well as the value.

              
        select *
        from closed_tickets
        where MONTH(closed_date) = 
              AND YEAR(closed_date) =  
              AND technician_id = 
    
    

    CF_SQL_VARCHAR might work and it might not, depending on how the date is actually stored (date type or var char).

提交回复
热议问题