Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. $this->db->select('tugs_table.postID, tugs_table.postQues, tugs_table.postOption1, tugs_table.postOption2, tugs_table.postOption3,
  2. tugs_table.postOption4, tugs_table.postOption5, tugs_table.postpicture1, tugs_table.postpicture2, tugs_table.postpicture3,
  3. tugs_table.postpicture4, tugs_table.postpicture5, tugs_table.postUser, tugs_table.postUserID, tugs_table.category, tugs_table.postDate,
  4. tugs_table.postType, connections_table.userID, connections_table.connectedUserID, users.avatar');
  5. $this->db->from('connections_table');
  6. $this->db->join('tugs_table', 'tugs_table.postUserID = connections_table.userID', 'left');
  7. $this->db->join('users', 'users.ID = tugs_table.postUserID', 'left');
  8. $this->db->where('connections_table.connectedUserID', $userID);
  9. $this->db->order_by('tugs_table.postDate', 'DESC');
  10. $query = $this->db->get();
  11. return $query->result();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement