Skip to content

Commit

Permalink
merge w mona
Browse files Browse the repository at this point in the history
  • Loading branch information
cws13003 committed Dec 5, 2017
2 parents 9a5406a + a0ba5f6 commit 2369e62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions www/application/models/User_Tweets_Model.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
class User_Tweets_Model extends CI_Model {
function getPosts(){
//$_SESSION['user_id'] = $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->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();
Expand Down

0 comments on commit 2369e62

Please sign in to comment.