Parameters
$keyColumns - The where clause key columns.
Returns
The Delete SQL statement.
Syntax
| PHP |
|
public function DeleteSQL(LJCDbColumns $keyColumns)
|
Creates the Delete SQL.
Example
| PHP |
// Creates the Delete SQL.
private static function DeleteSQL(LJCDataManager $manager)
{
$nameValue = "NameValue";
$methodName = "DeleteSQL()";
$data = new LJCDbColumns();
$data->Add("Name", value: $nameValue);
$affectedCount = $manager->Add($data);
// Create the Delete SQL statement.
// See constructor for how to create $manager.
$keys = new LJCDbColumns();
$keys->Add("Name", value: $nameValue);
$result = $manager->DeleteSQL($keys);
// result:
// delete from TableName
//
// where TableName.Name = 'NameValue'
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.