Return to v2.0 docs

getTableNamePrefix()


Model Class Miscellaneous Functions string model


Returns the table name prefix set for the table.

// Get the table name prefix for this user when running a custom query.
<cffunction name="getDisabledUsers" returntype="query">
<cfquery datasource="#get('dataSourceName')#" name="local.disabledUsers">
SELECT *
FROM #this.getTableNamePrefix()#users
WHERE disabled = 1
</cfquery>
<cfreturn local.disabledUsers>
</cffunction>

Related Functions

Miscellaneous Functions