Return to v2.1 docs

setTableNamePrefix()


Model Configuration Miscellaneous Functions void model


Sets a prefix to prepend to the table name when this model runs SQL queries.

Name Type Required Default Description
prefix string Yes A prefix to prepend to the table name.
// In `models/User.cfc`, add a prefix to the default table name of `tbl`.
function config(){
	setTableNamePrefix("tbl");
}

Related Functions

Miscellaneous Functions