Skip to content

Commit

Permalink
registration complete
Browse files Browse the repository at this point in the history
  • Loading branch information
cws13003 committed Dec 4, 2017
1 parent 7187e5c commit 14377c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
18 changes: 0 additions & 18 deletions www/application/controllers/User_Tweets.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

Expand All @@ -20,20 +19,3 @@ public function index() {
}

}
=======
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class User_Tweets extends CI_Controller {
function __Construct(){
parent::__Construct ();

$this->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
18 changes: 0 additions & 18 deletions www/application/models/User_Tweets_Model.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
class User_Tweets_Model extends CI_Model {
<<<<<<< HEAD
function getPosts(){
//$_SESSION['user_id'] = $id;
$this->db->select("first_name, last_name, username, tweet, date_time");
Expand Down Expand Up @@ -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

}

0 comments on commit 14377c9

Please sign in to comment.