Hello, I would like to show the results from the database only inserted in a specific time frame. I would therefore like to show only the results that have been inserted by the date (example: 20 March 2018).
This is an example of proof, with other restrictions such as the most voted.
This is an example of proof, with other restrictions such as the most voted.
PHP Code:
public function test($limit=null, $offset=null) {
$this->db->select('*');
$this->db->from('test');
$this->db->where('status', 1); // where status is 1 (active)
$this->db->order_by('likes', 'DESC');
$this->db->limit($limit);
$this->db->offset($offset);
$query = $this->db->get();
return $query->result_array();
}