Skip to content

Miscellaneous

setTableNamePrefix()

setTableNamePrefix() — returns any

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

NameTypeRequiredDefaultDescription
prefixstringyesA prefix to prepend to the table name.
setTableNamePrefix(prefix) <!--- In `models/User.cfc`, add a prefix to the default table name of `tbl` --->
<cffunction name="init">
    <cfset setTableNamePrefix("tbl")>
</cffunction>