Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->db->select('tugs_table.postID, tugs_table.postQues, tugs_table.postOption1, tugs_table.postOption2, tugs_table.postOption3,
- tugs_table.postOption4, tugs_table.postOption5, tugs_table.postpicture1, tugs_table.postpicture2, tugs_table.postpicture3,
- tugs_table.postpicture4, tugs_table.postpicture5, tugs_table.postUser, tugs_table.postUserID, tugs_table.category, tugs_table.postDate,
- tugs_table.postType, connections_table.userID, connections_table.connectedUserID, users.avatar');
- $this->db->from('connections_table');
- $this->db->join('tugs_table', 'tugs_table.postUserID = connections_table.userID', 'left');
- $this->db->join('users', 'users.ID = tugs_table.postUserID', 'left');
- $this->db->where('connections_table.connectedUserID', $userID);
- $this->db->order_by('tugs_table.postDate', 'DESC');
- $query = $this->db->get();
- return $query->result();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement