(03-19-2015, 05:25 AM)Riaanv Wrote: Hi i would like to know how i would go about getting all the newest posts from my users into one feed how would i achieve this in codeigniter? Basically i just want to select the latest post from each user in my database and display it in a feed like you would see on fb?
Just some help in the right direction would be greatly appreciated.
All you need is a time column in your database, and fetch that table by order by time.
EX:
PHP Code:
function displayData(){
$this->db->from($this->table_name);
$this->db->order_by("time column"
$query = $this->db->get();
return $query->result();
}