Macromedia ColdFusion 5 Training from the Source (With CD-ROM)

I l @ ve RuBoard

Used to remove excess white space from the beginning and end of variables .

Syntax

Trim(name_of_variable_to_be_trimmed)

Parameters

Trim needs to have the name of the variable you want to clean up.

Example

<!--- Clean up form value before database insert ---> <cfquery name="userinfo" datasource="users"? INSERT INTO tblUser ( Fname, Lname ) VALUES( '#Trim(form.Fname)#', '#Trim(form.Lname)#' ) </cfquery>

I l @ ve RuBoard

Категории