04-03-2017, 10:16 PM
On my database column date_created_on the date and time is in php time() as shown in image below
Just need to make sure that even though my date_created_on gets inserted with time() that it still can sort it out by date.
On my end I see no problems. When view list
![[Image: 3HsL2TqvzR1U.png]](https://ibin.co/3HsL2TqvzR1U.png)
Just need to make sure that even though my date_created_on gets inserted with time() that it still can sort it out by date.
On my end I see no problems. When view list
PHP Code:
public function getQuestions() {
$this->db->select('*');
$this->db->from('questions');
$this->db->order_by('date_created_on', 'desc');
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->result_array();
} else {
return false;
}
}
![[Image: 3HsL2TqvzR1U.png]](https://ibin.co/3HsL2TqvzR1U.png)
![[Image: 3HsLRloOTOTo.png]](https://ibin.co/3HsLRloOTOTo.png)
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!