Pivot to columns, side by side.

(3 posts) (2 voices)

Tags:

No tags yet.

  1. JamesG, Member

    Hi.
    I have a query to display images. is there anyway to display the images side by side (like in columns) rather than all in a row?
    I have tried the keepwithnext command but not sure if that's correct or how to put it in the query.

    my query:

    Select concat( 'dbr.html:') as 'All Photos'
    from uploads
    where in_id = Order_ID1;

    Many thanks
    James

  2. myDBR Team, Key Master

    You can use crosstab for that:

    select 'dbr.crosstab', 'image_title';
    
    select image_title, concat( 'dbr.html:', xx) as ''
    from uploads
    where in_id = Order_ID1;

    The xx part depends on what you have stored in the uploads-table (img-tag, plain filename...).

    --
    myDBR Team

  3. JamesG, Member

    Thanks a million. that did just how I wanted.


Reply

You must log in to post.