0
I am trying to perform a database search that returns the lowest and highest value of the 'time' (time) field using the following code in Cakephp 3:
$pedidos = TableRegistry::get('Pedidos');
$hora_max = $pedidos->find('list', array('fields' => array('MAX(hora) AS 'hora_maxima')));
$hora_minima = $pedidos->find('list', array('fields' => array('MIN(hora) AS 'hora_minima')));
debug($hora_maxima);
However it returns me the following error:
syntax error, Unexpected T_OBJECT_OPERATOR.
Could someone help me, please?
Daniel Omine thank you so much for your help. I am very happy to know that we have such a close community. I hope I can soon be contributing to the community as well. Again, thank you very much.
– Max Porcento