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: