For example what do the "" around #Trim(FORM.fromfirstname)# do? I'm adding <cfqueryparam...>
tags and am wondering if the quotes are still required?
<CFQUERY NAME="account" DATASOURCE="#APPLICATION.centralDSN#">
SELECT *
FROM users
WHERE (firstname =<CFQUERYPARAM VALUE="#Trim(FORM.fromfirstname)#">)
AND (lastname = <CFQUERYPARAM VALUE="#Trim(FORM.fromlastname)#">)
AND (email = '#Trim(FORM.fromemail)#')
</CFQUERY>
Here's one that doesn't use quotes for the WHERE
clause:
<CFIF getUser.RecordCount>
<CFQUERY NAME="cUser" DATASOURCE="#APPLICATION.centralDSN#">
UPDATE users
SET mailing_list = <CFIF IsDefined("FORM.mailing_list")>#FORM.mailing_list#<CFELSE>0</CFIF>
WHERE user_id = #getUser.user_id#
</CFQUERY>
</cfif>
EDIT: if they don't do anything there's no harm in keeping them, correct? In another file I found examples like
to="#ListFirst(EnglishEmailList)#"
cc="#ListRest(EnglishEmailList)#"
So if they are already there I'll leave them?