Railo 4.2 Reference
Choose a tag:

Tag <CFQUERYPARAM>

Checks the data type of a query parameter. The cfqueryparam tag is nested within a cfquery tag. It is embedded within the query SQL statement. If you specify its optional parameters, cfqueryparam also performs data validation.

Body

This tag can't have a body.

Example

	<cfqueryparam
		[cfsqltype="string"]
		[list="boolean"]
		[maxlength="number"]
		[null="boolean"]
		[scale="number"]
		[separator="string"]
		[sqltype="string"]
		[value="any"]>
	
This tag is also supported within cfscript
	<cfscript>
		queryparam
		[cfsqltype="string"]
		[list="boolean"]
		[maxlength="number"]
		[null="boolean"]
		[scale="number"]
		[separator="string"]
		[sqltype="string"]
		[value="any"];
	</cfscript>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
cfsqltype string No This Attribute is deprecated 
list boolean No Yes or No. Indicates that the parameter value of the value attribute is a list of values,
separated by a separator character. The default is No 
maxlength number No Maximum length of the parameter. The default value is the length of the string specified in
the value attribute. 
null boolean No Yes or No. Indicates whether the parameter is passed as a null. If Yes, the tag ignores the
value attribute. The default is No. 
scale number No Number of decimal places of the parameter. The default value is zero. 
separator string No Specifies the character that separates values in the list of parameter values in the value
attribute. The default is a comma. If you specify a list of values for the value attribute, you must
also specify the list attribute. 
sqltype string No The SQL type that the parameter (any type) will be bound to. 
value any No Specifies the actual value that Railo passes to the right of the comparison operator in a
where clause.