Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **Subscription Table**
- -------------------------------
- id actors_id user_id
- -------------------------------
- 1 5 1
- 2 7 2
- 3 12 96
- 4 18 54
- **Actors Content**
- -------------------------------
- id contend_id actors_id
- -------------------------------
- 1 25 5
- 2 65 18
- 3 120 18
- 4 98 12
- **Content Table**
- -------------------------------
- r_id title content_post
- -------------------------------
- 25 abvg xxxxxxxxx
- 65 djki fffffffff
- 98 sdrt rrrrrrrrr
- 120 fgty tttttttty
- SELECT Content.*, (SELECT Actors.contend_id FROM Actors WHERE Actors.contend_id = Content.r_id) as views FROM Content,Actors WHERE Actors.actors_id IN (SELECT Subscription.actors_id FROM Subscription WHERE Subscription.user_id = 96)
Add Comment
Please, Sign In to add comment