<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="residents">
INSERT INTO notes (jssn, jnote, jDate)
VALUES (
<cfif IsDefined("FORM.residentName") AND #FORM.residentName# NEQ "">
<cfqueryparam value="#FORM.residentName#" cfsqltype="cf_sql_clob" maxlength="255">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.thenote") AND #FORM.thenote# NEQ "">
<cfqueryparam value="#FORM.thenote#">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.notedate") AND #FORM.notedate# NEQ "">
<cfqueryparam value="#FORM.notedate#" cfsqltype="cf_sql_longvarchar">
<cfelse>
''
</cfif>
)
</cfquery>
</cfif>
|