Guest User

Untitled

a guest
Jun 25th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. /*
  2.  
  3. I have 3 tables. Users, Topics and Quotes. Here is my tables and columns:
  4.  
  5. users
  6. ------
  7. user_id
  8. email
  9. username
  10.  
  11. topics
  12. ------
  13. topic_id
  14. topic_name
  15.  
  16. quotes
  17. ------
  18. quote_id
  19. quote_name
  20.  
  21. mix_table
  22. ---------
  23. user_id
  24. topic_id
  25. quote_id
  26.  
  27.     $this->db->from('users');
  28.     $this->db->join('quotes', 'quotes.quote_id = mix_table.quote_id');
  29.     $this->db->join('topics', 'topics.topic_id = mix_table.topic_id');
Add Comment
Please, Sign In to add comment