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':

 

global $dal;
$tblUsers = $dal->Table("UsersTable");
$tblUsers->Param["ID"]=32;
$tblUsers->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':

 

global $dal;
$tblUsers = $dal->Table("UsersTable");
$tblUsers->Param["FirstName"]="Bob";
$tblUsers->Param["Email"]="test@test.com";
$tblUsers->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

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software