• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
select multiple categories using join method

#1
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?!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.