diff --git a/www/application/controllers/User_Tweets.php b/www/application/controllers/User_Tweets.php index e756de0..e5b6fb6 100644 --- a/www/application/controllers/User_Tweets.php +++ b/www/application/controllers/User_Tweets.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD load->database(); - $this->load->model('User_Tweets_Model'); - $this->output->enable_profiler(TRUE); - } - - public function index(){ - $this->data['posts'] = $this->Users_Tweets_Model2->getPosts(); - $this->load->view('user', $this->data); - } - } ->>>>>>> 41b5a2f810bd6d9f899d79ce9dd4069ec9f97dda diff --git a/www/application/models/User_Tweets_Model.php b/www/application/models/User_Tweets_Model.php index 3ef6c63..6292bf0 100644 --- a/www/application/models/User_Tweets_Model.php +++ b/www/application/models/User_Tweets_Model.php @@ -1,6 +1,5 @@ db->select("first_name, last_name, username, tweet, date_time"); @@ -33,22 +32,5 @@ function addTweet(){ return $this->db->insert('tweets', $data); */ } -======= - - 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, 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(); - } - ->>>>>>> 41b5a2f810bd6d9f899d79ce9dd4069ec9f97dda }