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 |
---|
$webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon"; require_once "$webCommonPath/LJCDataManagerLib.php"; require_once "$webCommonPath/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; |