Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to sort photos in order of likes, comments entries desc. Need to get all rows of photos, photo.comments, photo.likes
- photos
- ------------
- id
- url
- created
- modified
- likes
- --------
- id
- photo_id
- user_id
- created
- modified
- comments
- ----------
- id
- photo_id
- user_id
- comment
- created
- modified
- Example : if comments or likes have a new entry, this photo should be first.
Add Comment
Please, Sign In to add comment