Edgewall Software

Changes between Initial Version and Version 1 of Ticket #10286, comment 8


Ignore:
Timestamp:
Aug 19, 2015, 9:18:16 PM (9 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10286, comment 8

    initial v1  
    11Replying to [comment:7 psuter]:
    22> Something like this maybe:
    3 > {{{#!sql
    4 > SELECT t.id as id,
    5 >        t.summary as summary,
    6 >        group_concat(a.description,", ") as "file descriptions",
    7 >        group_concat(a.filename,", ") as files
    8 > FROM attachment a
    9 > INNER JOIN ticket t
    10 > ON a.id == t.id
    11 > WHERE a.type=="ticket"
    12 > GROUP BY t.id
    13 > }}}
    14 >
    15 > Or to get one table per ticket with one row per attachment:
    16 > {{{#!sql
    17 > SELECT a.filename AS id, "attachment" AS _realm,
    18 >        "ticket" AS _parent_realm, t.id AS _parent_id,
    19 >        a.description as description,
    20 >        a.size as size,
    21 >        "#" || t.id || " " || t.summary as  __group__,
    22 >        '../ticket/' || t.id as __grouplink__
    23 > FROM attachment a
    24 > INNER JOIN ticket t
    25 > ON a.id == t.id
    26 > WHERE a.type=="ticket"
    27 > }}}
     3> [...]
    284
    295It works!