Skip to content

Instantly share code, notes, and snippets.

@tareko
Created May 20, 2012 21:36
Show Gist options
  • Select an option

  • Save tareko/2759636 to your computer and use it in GitHub Desktop.

Select an option

Save tareko/2759636 to your computer and use it in GitHub Desktop.
NoReGreT
SELECT `Tag`.`id`, `Tag`.`name` FROM `facemon`.`tags` AS `Tag`
JOIN `facemon`.`news_tags` AS `NewsTag` ON (`Tag`.`id` = `NewsTag`.`tag_id`)
JOIN `facemon`.`news` AS `News` ON (`NewsTag`.`news_id` = `News`.`id`)
JOIN `facemon`.`members_news` AS `MembersNews` ON (`MembersNews`.`news_id` = `News`.`id`)
JOIN `facemon`.`members` AS `Member` ON (`Member`.`id` = `MembersNews`.`member_id`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment