<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.

It's use is essential for performance and security

This tag cannot have a body.

This tag is also supported within <cfscript>

Attribute Description
maxlength
number, optional

Maximum length of the parameter. The default value is the length of the string specified in the value attribute.

list
boolean, optional

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

scale
number, optional

Number of decimal places of the parameter. The default value is zero.

separator
string, optional

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.

null
boolean, optional

Yes or No. Indicates whether the parameter is passed as a null. If Yes, the tag ignores the value attribute. The default is No.

cfsqltype
string, optional

This attribute has been deprecated, use instead the attribute "sqltype" that has exact the same functionality.

value
any, optional

Specifies the actual value that Lucee passes to the right of the comparison operator in a where clause.

sqltype
string, optional

The SQL type that the parameter (any type) will be bound to.

<cfqueryparam
    [maxlength=number]
    [list=boolean]
    [scale=number]
    [separator=string]
    [null=boolean]
    [cfsqltype=string]
    [value=any]
    [sqltype=string]
>

Examples

There are currently no examples for this tag.

See also