deleteByKey()
Description
Finds the record with the supplied key and deletes it. Returns true on successful deletion of the row, false otherwise.
Function Syntax
deleteByKey(key)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key |
any |
Yes | |
Primary key value(s) of the record to fetch. Separate with comma if passing in multiple primary key values. Accepts a string, list or a numeric value. |
Examples
<!--- Delete the user with the primary key value of `1` --->
<cfset result = model("user").deleteByKey(1)>
