| PHP |
|---|
|
public function Load(?LJCDbColumns $keyColumns = null , ?array $propertyNames = null, ?LJCJoins $joins = null , ?string $filter = null): ?array |
The $keyColumns collection parameter contains the data for the where clause.
The optional $propertyNames array parameter contains the names of the properties that will be retrieved. All columns are retrieved if it is null.| PHP |
|---|
// Loads the records for the provided values.
private static function Load(LJCDataManager $manager)
{
$nameValue = "NameValue";
$methodName = "Load()";
$data = new LJCDbColumns();
$data->Add("Name", value: $nameValue);
$affectedCount = $manager->Add($data);
// Load the test data.
// See constructor for how to create $manager.
$keys = new LJCDbColumns();
$keys->Add("Name", value: $nameValue);
$rows = $manager->Load($keys);
if (null == $rows
|| !is_array($rows)
|| 0 == count($rows))
{
echo($manager->SQL);
echo("\r\n{$methodName} No data retrieved.");
}
// $manager->SQL =
// select
// TableName.ID,
// TableName.Name
// from TableName
// where TableName.Name = 'NameValue'
$keys = new LJCDbColumns();
$keys->Add("Name", value: $nameValue);
$affectedCount = $manager->Delete($keys);
}
|