Jump to content

d_php

New Members
  • Posts

    1
  • Joined

  • Last visited

d_php's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to sort the subquery (joined table) result by using order by id DESC. I am unable to implement this. I used the following query to sort Table2 in DESC order by id, which is not correct. $result = $this->Table->find('all', ['contain' => ['Table2' => ['order' => ['id' => 'desc']]]])->where(['col1' => $col1, 'col2' => $col2])->order(["col3" => 'desc'])->toArray(); Is there any other way available?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.