Hello I need to do a query that returns me the values of only the last 24h
I have the following query:
$date = date("Y-m-d H:i:s");
$this->db->select('*');
$this->db->from('inscricoes');
$this->db->where('data <', $date);
$this->db->where('data >', $date-1);
$query = $this->db->get();
but is returning all values