Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<cfquery datasource=""....>
select a, b, c
from tbl1
where e = <cfqueryparam cfsqltype="cf_sql_integer" value="#URL.Value#">
</cfquery>
<cftry>
<cfquery datasource=""....>
select a, b, c
from tbl1
where e = <cfqueryparam cfsqltype="cf_sql_integer" value="#URL.Value#">
</cfquery>
<cfcatch type="Any">
<!--- error trapping --->
<!--- could do a cfinclude here for an error file --->
<cfmail to="you" from="website" subject="error">
<cfoutput>#cgi.remote_addr#</cfoutput>
</cfmail>
</cfcatch>
</cftry>
<cfquery datasource="#DSN#" name="qLogin" dbtype="oledb">
select username, password, status, userLevel
from users
where userName = <cfqueryparam value="#TRIM(form.userName)#" cfsqltype="cf_sql_char"> and password = <cfqueryparam value="#TRIM(form.password)#" cfsqltype="cf_sql_char"> and status = 'Approved'
</cfquery>
<cfquery datasource="#DSN#" name="qNewMessage" dbtype="oledb">
INSERT into threads
(username, title, message, ipAddress, msgSent, updated)
VALUES
('#TRIM(cookie.ODRMember)#', '#TRIM(Form.title)#', '#TRIM(Form.message)#', '#CGI.remote_addr#', #now()#, #now()#)
</cfquery>
<cfquery datasource="#DSN#" name="qNewResponse" dbtype="oledb">
INSERT into Response
(threadId, username, message, ipAddress, msgSent)
VALUES
('#TRIM(Form.threadId)#', '#TRIM(cookie.ODRMember)#', '#TRIM(Form.message)#', '#CGI.remote_addr#', #now()#)
</cfquery>
<cfquery datasource="#DSN#" name="qUpdateThread" dbtype="oledb">
UPDATE Threads
set updater = '#TRIM(cookie.ODRMember)#', updated = #now()#
where threadId = <cfqueryparam value="#TRIM(form.threadId)#" cfsqltype="cf_sql_integer">
</cfquery>
<cfquery datasource="#DSN#" name="qNewMessage" dbtype="oledb">
INSERT into threads
(username, title, message, ipAddress, msgSent, updated)
VALUES
('#TRIM(cookie.ODRMember)#', '#TRIM(Form.title)#', '#TRIM(Form.message)#', '#CGI.remote_addr#', #now()#, #now()#)
</cfquery>
<cfquery datasource="#DSN#" name="qAddGuestBook" dbtype="oledb">
INSERT into guestbook
(name, hometown, email, message, ipAddress, dateposted, display) VALUES (<cfqueryparam cfsqltype="cf_sql_char" value="#form.name#">, <cfqueryparam cfsqltype="cf_sql_char" value="#Form.hometown#">, <cfqueryparam cfsqltype="cf_sql_char" value="#Form.email#">, <cfqueryparam cfsqltype="cf_sql_char" value="#Form.message#">, <cfqueryparam cfsqltype="cf_sql_char" value="#CGI.remote_addr#">, <cfqueryparam cfsqltype="cf_sql_date" value=#now()#>, <cfif #TRIM(form.name)# eq #TRIM(form.homeTown)#>'No'<cfelse>'Yes'</cfif>)
</cfquery>
We don't know, you're the only person who can answer that. The cfsqltype has to match whatever datatype that particular field is in the database. If it's a Char, then the cfsqltype has to be Char, if it's a Bit, then the cfsqltype has to be Bit, etc......is the cfsqltype right as well