Welcome Guest, Not a member yet? Register   Sign In
Order by Question
#1

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


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]

[Image: 3HsLRloOTOTo.png]
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
Order by Question - by wolfgang1983 - 04-03-2017, 10:16 PM
RE: Order by Question - by JayAdra - 04-04-2017, 12:34 AM
RE: Order by Question - by wolfgang1983 - 04-04-2017, 12:50 AM
RE: Order by Question - by JayAdra - 04-04-2017, 03:23 AM
RE: Order by Question - by wolfgang1983 - 04-04-2017, 03:50 AM
RE: Order by Question - by InsiteFX - 04-04-2017, 04:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB