diff --git a/www/application/models/User_Tweets_Model.php b/www/application/models/User_Tweets_Model.php index 002bf21..9e01b77 100644 --- a/www/application/models/User_Tweets_Model.php +++ b/www/application/models/User_Tweets_Model.php @@ -3,14 +3,18 @@ class User_Tweets_Model extends CI_Model { function getPosts(){ + //$this->load->library('session'); + //session_start(); + $user_id = 1; //$this->session->userdata('session_id'); - $this->db->select("first_name, last_name, username, tweet, date_time"); - $this->db->from('Users, Tweets'); - $this->db->where('Users.id = Tweets.user_id'); + $this->db->select("first_name, last_name, username, tweet, date_time, location"); + $this->db->from("Users, Tweets"); + $this->db->where("Users.id = Tweets.user_id and Users.id = $user_id"); $this->db->order_by('date_time', 'DESC'); $query = $this->db->get(); return $query->result_array(); } + } ?> diff --git a/www/application/views/home.php b/www/application/views/home.php index bf2eaeb..7153591 100644 --- a/www/application/views/home.php +++ b/www/application/views/home.php @@ -1,32 +1,25 @@ - -
- -diff --git a/www/application/views/templates/header.php b/www/application/views/templates/header.php index 5584cc0..de05d9c 100644 --- a/www/application/views/templates/header.php +++ b/www/application/views/templates/header.php @@ -1,8 +1,10 @@ - + + +
-
+
+ + -