Improvs
Member
Hello. Is it possible to add extra select sql to xenforo Finder query?
For example, I have XF finder query like this:
I need to improve it with my select query:
And at the end I'd like to ORDER BY retrieve_money_allow_time_over DESC.
So, the main question is: How to implement my 'select query' inside XF ORM query?
For example, I have XF finder query like this:
$BuyerFinder = \XF::finder('MK\Store:Buyer')
->with('Thread', true)
->with('User', true)
->where('stage', 'active')
->fetch($limit, $offset);
I need to improve it with my select query:
CASE
WHEN from_unixtime(action_buyed_at) <= now() - INTERVAL 2 DAY
THEN action_buyed_at
END
as retrieve_money_allow_time_over
And at the end I'd like to ORDER BY retrieve_money_allow_time_over DESC.
So, the main question is: How to implement my 'select query' inside XF ORM query?