Facebook
From Tinct Pelican, 1 Year ago, written in Plain Text.
This paste is a reply to sql from sdada - view diff
Embed
Download Paste or View Raw
Hits: 104
  1. SELECT galleries.pk AS galleries_pk, galleries.uid AS galleries_uid, galleries.title AS galleries_title, galleries.slug AS galleries_slug, galleries.description AS galleries_description, galleries.active AS galleries_active, galleries.pub_date AS galleries_pub_date, galleries.pub_end AS galleries_pub_end, galleries.sponsor AS galleries_sponsor, galleries.tags AS galleries_tags, galleries.node_pk AS galleries_node_pk, galleries.site_id AS galleries_site_id, galleries.protected AS galleries_protected, galleries.created_by AS galleries_created_by, galleries.edited_by AS galleries_edited_by, galleries.last_updated AS galleries_last_updated, galleries._url AS galleries__url, galleries.poly_type AS galleries_poly_type, galleries.created_date AS galleries_created_date, photos_1.pk AS photos_1_pk, photos_1.uid AS photos_1_uid, photos_1.title AS photos_1_title, photos_1.description AS photos_1_description, photos_1.slug AS photos_1_slug, photos_1.pub_date AS photos_1_pub_date, photos_1.author AS photos_1_author, photos_1.agency AS photos_1_agency, photos_1.source AS photos_1_source, photos_1.image_id AS photos_1_image_id, photos_1.type AS photos_1_type, photos_1.code AS photos_1_code, photos_1.poly_type AS photos_1_poly_type, photos_1.created_by AS photos_1_created_by, photos_1.edited_by AS photos_1_edited_by, photos_1.reuse_type AS photos_1_reuse_type, photos_1.created_date AS photos_1_created_date, photos_1.last_updated AS photos_1_last_updated, photos_1.file_name AS photos_1_file_name, images_1.pk AS images_1_pk, images_1.uid AS images_1_uid, images_1.name AS images_1_name, images_1.mimetype AS images_1_mimetype, images_1.uri AS images_1_uri, images_1.width AS images_1_width, images_1.height AS images_1_height, images_1.crop AS images_1_crop, images_2.pk AS images_2_pk, images_2.uid AS images_2_uid, images_2.name AS images_2_name, images_2.mimetype AS images_2_mimetype, images_2.uri AS images_2_uri, images_2.width AS images_2_width, images_2.height AS images_2_height, images_2.crop AS images_2_crop, gallery_contents_1.pk AS gallery_contents_1_pk, gallery_contents_1.uid AS gallery_contents_1_uid, gallery_contents_1.object_id AS gallery_contents_1_object_id, gallery_contents_1.title AS gallery_contents_1_title, gallery_contents_1.description AS gallery_contents_1_description, gallery_contents_1.`order` AS gallery_contents_1_order, gallery_contents_1.gallery_id AS gallery_contents_1_gallery_id
  2. FROM galleries LEFT OUTER JOIN gallery_contents AS gallery_contents_1 ON galleries.pk = gallery_contents_1.gallery_id LEFT OUTER JOIN photos AS photos_1 ON photos_1.pk = gallery_contents_1.object_id LEFT OUTER JOIN images AS images_1 ON images_1.pk = photos_1.image_id LEFT OUTER JOIN (associacion AS associacion_1 INNER JOIN images AS images_2 ON images_2.pk = associacion_1.image_pk) ON photos_1.pk = associacion_1.photo_pk
  3. WHERE galleries.node_pk = %(node_pk_1)s AND galleries.pub_date > %(pub_date_1)s ORDER BY gallery_contents_1.`order`