CodeIgniter Forums

Full Version: select multiple categories using join method
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have this database table structure for posts, categories and post_categories

posts: 
Code:
| id | title | details
| 1  | test  | test details

categories: 
Code:
| id | name     | parent_id
|. 1 | cat one  |     0
|  2 | cat two  |     0
|  3 | cat three|     0

post_categories
Code:
|category_id|post_id
|.     1    |.   1
|.     2.   |.   1


I insert multiple categories using input checkbox for each post in post_categories table. Now in update page i need to show categories list and checked input checkbox. how do can i generate this output using join method?!