Please enable JavaScript to view this site.

Navigation: » No topics above this level «

DAL method: Delete() (Deprecated)

Scroll Prev Next More

 

Deprecated

This function is deprecated, and we recommend using the DB:Delete() function from Database API.

 

Deletes one or more records from the database.

Syntax

Delete()

Arguments

No arguments.

Return value

No return value.

Example 1

Delete all records where the ID is '32':

 

dal.Table("UsersTable").Param("ID")=32
dal.Table("UsersTable").Delete()

 

The corresponding SQL query:

 

Delete from UsersTable where ID=32

Example 2

Delete all records where FirstName is 'Bob' and Email is 'test@test.com':

 

dal.Table("UsersTable").Param("FirstName")="Bob"
dal.Table("UsersTable").Param("Email")="test@test.com"
dal.Table("UsersTable").Delete()

 

The corresponding SQL query:

 

Delete from UsersTable where FirstName='Bob' and Email='test@test.com'

See also:

DAL Method: Add

DB API: Delete

Database API

About Data Access Layer