I try this but it’s not working
{
'conditions' => array('Graph.hid' => $hid, 'DATE(Graph.created) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)', 'Graph.number'=>2)
}
Actually needed the current time data of previous day.
Can anyone help me? thanks in advance.
you can use BETWEEN in your query (find) like this if you have DATETIME :
between in cake is :
other ways to calculate the last day :