On my database column when a user creates a thread the date
I set date using php time()
Will it still sort date out correct if use time() instead of date() if not what would you recommend.
Because I need to be able to view the latest threads
I set date using php time()
Will it still sort date out correct if use time() instead of date() if not what would you recommend.
Because I need to be able to view the latest threads
PHP Code:
$this->db->order_by('date_created', 'desc');
PHP Code:
public function get_users_threads($user_id) {
$this->db->where('user_id', $user_id);
$this->db->order_by('date_created', 'desc');
$thread_query = $this->db->get($this->db->dbprefix . 'thread');
if ($thread_query->num_rows() > 0) {
return $thread_query->result_array();
} else {
return FALSE;
}
}