Advertisement
JoshDreamland

Activity

Aug 25th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.59 KB | None | 0 0
  1. SELECT date, id_author, concat(' posted a new blog, "', title, '"') as action
  2.    FROM `edc_blogs` limit 10
  3. UNION SELECT date, id_author, concat(' posted a new ', lower(type), ', ', name, '"') as action
  4.    FROM `edc_games`
  5. UNION SELECT mix.date, id_author, concat('commented on ', place) as action from edc_comments join (
  6.   SELECT id_thread, date, concat('the blog, "', title, '"') as place FROM `edc_blogs`
  7.   UNION
  8.   SELECT id_thread, date, concat('the ', lower(type), ', ', name, '"') as place FROM `edc_games`
  9. ) as mix on edc_comments.id_thread = mix.id_thread
  10. order by date desc
  11. limit 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement