setTableNamePrefix()
Description
Sets a prefix to prepend to the table name when this model runs SQL queries.
Function Syntax
setTableNamePrefix(prefix)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prefix |
string |
Yes | |
A prefix to prepend to the table name. |
Examples
<!--- In `models/User.cfc`, add a prefix to the default table name of `tbl` --->
<cffunction name="init">
<cfset setTableNamePrefix("tbl")>
</cffunction>
