Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.29 KB | None | 0 0
  1. SELECT
  2.   DISTINCT c.id as cid,
  3.   c.title,
  4.   c.description,
  5.   t.value as tags
  6. FROM
  7.   connect_tag_com ctc
  8.   JOIN tags t on t.id = ctc.tag_id
  9.   JOIN components c on c.id = ctc.component_id
  10. WHERE
  11.   ctc.tag_id IN ('9', '10', '1')
  12. ORDER BY
  13.   FIELD (ctc.tag_id, "9", "10", "1") ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement