A few cakephp find() functions stopped working after a server migration from php 5.2 to 5.4 and mysql 5.1 to 5.7. I am trying to fix them but according to the cake manual I do not see anything that could be wrong.
I have tried modifying the ‘conditions’ part that seems to be what is causing the problem to no avail. the function does not return anything.
function infoServorder($ev_id){
return $this->find('all', array(
'link' => array(
'Service' => array(
'QuestionnairesService' => array('Questionnaire' => array('conditions' => 'QuestionnairesService.questionnaire_id = Questionnaire.id'),
'conditions' => 'Service.id = QuestionnairesService.service_id'
),
'conditions' => 'Service.id = Evaluation.service_id'
)
),
'fields' => array('Evaluation.order_id','Service.id','Service.name'),
'conditions' => array('Evaluation.id' => $ev_id, 'Questionnaire.type_q' => 'TSP'),
'order' => array('Questionnaire.id ASC')
));
}
I try to get the ‘fields’ => array(‘Evaluation.order_id’,‘Service.id’,‘Service.name’) printed on the screen in order to move forward but the function doesn’t return anything.
I have a second function that is very similar and it returns all its fields ok.