XenForo
Administrative
- Thread starter
- Admin
- #1
Let's say we have to fetch all data via xF2 finder:
PHP:
This entity has two TO_MANY relations (one is the Attachments).
How could I prepare an output variable which will have all necessary data without leave xF2 to make individual queries for the extra TO_MANY relations?
I can get the primary keys of Data and then run one query for ALL attachments.
Example:
PHP:
Read more
ادامه مطلب...
PHP:
$data = \XF::finder('Scandals\Addon:Data')->fetch();
This entity has two TO_MANY relations (one is the Attachments).
How could I prepare an output variable which will have all necessary data without leave xF2 to make individual queries for the extra TO_MANY relations?
I can get the primary keys of Data and then run one query for ALL attachments.
Example:
PHP:
Code:
$output = [];
$ids = [];
foreach ($data AS $d)...
Read more
ادامه مطلب...