I have the following queries in CodeIgniter to find any data in which the date_created field is less than 24 hours.
Here is my code in Models
Code:
public function checkDeposit($preOrder)
{
return $this->db->table('deposit')
->where('preorder_code', $preOrder)
->where('status', 0)
->where('date_created <', strtotime(date('YmdHis'), INTERVAL 1 DAY))
->get()
->getRowArray();
}
But the above query is not working.
What I want in short is, return all rows which the date_created is less than 24 hours.
My date_created format is Unix TimeStamp (1718204380)
How to get data less than 24 hours in Models ?