ColdFusion Data Type Mappings to MySQL Data Type(s)
To secure your CFML it is recommended that you use the cfqueryparam tag within every cfquery tag. You can optimize this process by specifying the CFSQLType attribute. But what about when you want to use a MySQL Database?
The LiveDocs cfqueryparam topic does not include the mapping of ColdFusion SQL data types for MySQL in the usage table, but a helpful comment attached to the doc gives some insight.
ColdFusion Data Type Mappings to MySQL Data Type(s):
CF_SQL_BIGINT | bigint
CF_SQL_BINARY | binary
CF_SQL_BIT | bit (MySQL 5)
CF_SQL_BLOB | blob, tinyblob, mediumblob
CF_SQL_CJAR | char
CF_SQL_DATE | date
CF_SQL_DECIMAL | decimal
CF_SQL_DOUBLE | double
CF_SQL_FLOAT | float
CF_SQL_INTEGER | mediumint, int
CF_SQL_REAL | real
CF_SQL_SMALLINT | smallint
CF_SQL_TIME | time
CF_SQL_TIMESTAMP | datetime, timestamp
CF_SQL_TINYINT | tinyint
CF_SQL_VARBINARY | varbinary
CF_SQL_VARCHAR | varchar, text, longtext, mediumtext
Comments(0)