How to choose all user orders from ID 12 for February? According to the idea, this is done through the API. Who can tell me.
Answer 1
In the first example, from the CSalerder :: GetList documentation insert the desired user ID into the filter.
& lt;?
// withdraw the dates of all orders of the current user for the current month, sorted by date
$ ArFilter = Array (
"User_id" = & gt; 12,
"& GT; = Date_insert" = & gt; Date ($ DB- & GT; DateFormattophp (CSITE :: GetDateFormat ("Short")), mktime (0, 0, 0, date ("n"), 1, date ("y")))
);
$ db_sales = CSalerder :: GetList (Array ("Date_insert" = & gt; "ASC"), $ arfilter);
While ($ ar_sales = $ db_sales- & gt; fetch ())
{
Echo $ ar_sales ["date_insert_format"]. "& lt; br & gt;";
}
? & gt;