daily pastebin goal
30%
SHARE
TWEET

Untitled

Unmanner Mar 20th, 2015 235 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT SQL_NO_CACHE
  2.                 a.*,
  3.         i.object_id,
  4.         u.phone, u.first_name AS first_name, u.email AS user_email, u.user_type,
  5.         ag.name AS agency_name, ag.phone AS agency_phone, ag.email AS agency_email, ag.url AS agency_site,
  6.     IFNULL(i.object_id, UUID()) AS unq_ancestor,
  7.     GROUP_CONCAT(i.gen_name, '.jpg' SEPARATOR ';') AS image_name
  8. FROM
  9.     objects a
  10.     LEFT JOIN object_images i ON a.id = i.object_id
  11.          JOIN users  u ON u.id = a.user_id
  12.     LEFT JOIN organizations ag ON ag.id = u.organization_id
  13. WHERE
  14.     a.object_status = 2
  15.     AND a.object_type IN (1, 2, 3, 4)
  16. GROUP BY a.id
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top