Bitrix Site Manager

CSaleOrderUserProps::GetList

CDBResult
CSaleOrderUserProps::GetList(
 string &by,
 string &order,
 array arFilter = Array()
);

The method GetList returns an optionally sorted and filtered list of customer profiles.

Parameters

ParameterDescription
by Specifies the name of a parameter by which the sorting is to be performed. 

The following values are possible:
  • DATE_UPDATE - the date of the last modification (default);
  • NAME - customer profile name;
  • ID - the customer profile ID.
order Sort order. Can be one of the following:
  • ASC - ascending (default);
  • DESC - descending.
arFilter The filter is an associated array whose keys are the discount parameter names, and values are the conditions.

The following keys are possible:
  • ID - the customer profile ID;
  • USER_ID - the ID of a user for whom the profile belongs;
  • PERSON_TYPE_ID - the payer type ID.

Return Values

Returns an instance of CDBResult containing a set of associated arrays with the following keys.

Key Description
ID The customer ID.
NAME Profile name.
USER_ID The ID of a user for whom the profile belongs.
PERSON_TYPE_ID The payer type ID.
DATE_UPDATE The date of the last modification.

Example



<?
// Select all customer profiles of the current user
// sort the list by the modification date
$db_sales = CSaleOrderUserProps::GetList(($b="DATE_UPDATE"), 
                                         ($o="DESC"), 
                                         Array("USER_ID" => $USER->GetID()));
while ($ar_sales = $db_sales->Fetch())
{
   echo $ar_sales["NAME"]."<br>";
}
?>