CFQUERYPARAM Question - what to do when query is complex?
Running Windows, CF 2016, SQL Server db 2008R2
Creating new queries that I need assistance on how to implement CFQUERYPARAM into the code.
Below is an example of the code without the CFQUERYPARAM (my calendar dates are a text field, not a date field in the SQL Server db):
SELECT date, day FROM calendar
WHERE (calendar.date >= '#todays_date#' and calendar.type = 'B')
Is the placement of the CFQUERYPARAM correct on the below? I haven't been able to find anything showing this type of SQL code.
SELECT date, day FROM calendar
WHERE <cfqueryparam value="calendar.date" cfsqltype="cf_sql_char"></cfqueryparam> =
(<cfqueryparam value="'#todays_date#'" cfsqltype="cf_sql_char"></cfqueryparam> AND
calendar.type = 'B')
I was able to find documented that you need not use CFQUERYPARAM around constants.
Verification would be helpful. Thanks.
Libby H.
