Parameters
$keyColumns - The where clause key columns.
$propertyNames - The included column property names.
$joins - _ParamSummary_
Returns
The Retrieve SQL statement.
Syntax
| PHP |
public function RetrieveSQL(LJCDbColumns $keyColumns , array $propertyNames = null, LJCJoins $joins = null)
|
Creates the Retrieve SQL.
Example
| PHP |
// Creates the Retrieve SQL.
private static function RetrieveSQL(LJCDataManager $manager)
{
$nameValue = "NameValue";
$methodName = "RetrieveSQL()";
$data = new LJCDbColumns();
$data->Add("Name", value: $nameValue);
$affectedCount = $manager->Add($data);
// Retrieve with SQLLoad().
// See constructor for how to create $manager.
$keyColumns = new LJCDbColumns();
$keyColumns->Add("Name", value: $nameValue);
$result = $manager->RetrieveSQL($keyColumns);
// result:
// select
// TableName.ID,
// TableName.Name
// from TableName
// where TableName.Name = 'NameValue'
$keys = new LJCDbColumns();
$keys->Add("Name", value: $updateValue);
$affectedCount = $manager->Delete($keys);
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.