In older version for cakephp 1.3 ,when using custom query like below I was getting result in array of defined model or table name, like below
$query = "SELECT survey_responses
. created
, survey_question_options
. name
FROM survey_responses
LEFT JOIN survey_question_options
ON survey_responses
. id
= survey_question_options
. survey_response_id
";
$res = $this->ChallengeResponse->query($query);
result is
Array
(
[0] => Array
(
[‘survey_responses’] => Array
(
[created] => 2020-04-17 07:10:52
)
[‘survey_question_options’] => Array
(
[name] => ‘test’
)
)
[1] => Array
(
[‘survey_responses’] => Array
(
[created] => 2020-04-18 07:10:52
)
[‘survey_question_options’] => Array
(
[name] => ‘test2’
)
)
)
but using connection manager in cakephp 3.x I am getting result like below
Array
(
[0] => Array
(
[created] => 2020-04-17 07:10:52
[name] => 'test'
)
[1] => Array
(
[created] => 2020-04-18 07:10:52
[name] => 'test2'
)
)