Skip to content

Model Configuration

setTableNamePrefix()

setTableNamePrefix() — returns void

Available in: model Category: Miscellaneous Functions

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

NameTypeRequiredDefaultDescription
prefixstringyesA 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");
}