| PHP |
|---|
|
public function Retrieve(LJCDbColumns $keyColumns , array $propertyNames = null, LJCJoins $joins = 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 |
|---|
include_once "LJCRoot.php";
$prefix = RelativePrefix();
include_once "$prefix/LJCPHPCommon/LJCDataManagerLib.php";
include_once "$prefix/LJCPHPCommon/LJCDBAccessLib.php";
// See constructor for how to create $connectionValues.
$tableName = "TableName";
$manager = new LJCDataManager($connectionValues, $tableName);
$keyColumns = new DbColumns();
$keyColumns->Add("ID", value:1);
$propertyNames = [];
$propertyNames[] = "ID";
$propertyNames[] = "Name";
$row = $manager->Retrieve($keyColumns, $propertyNames);
// $manager->SQL =
// select
// TableName.ID,
// TableName.Name
// from TableName
// where TableName.ID = 1;
|