V
V
Valentin Melnik2019-01-12 17:49:54
MySQL
Valentin Melnik, 2019-01-12 17:49:54

Which plugin can create a gallery for any content?

What plugin is suitable for organizing a gallery not only for a picture, but for any content?
That is, to work on the principle of the Lightbox gallery in Magnific Popup, but with divs, and not just pictures. We click on the picture (or any block) and a pop-up window appears with the desired content (picture, text - whatever we put in a div) and then you can scroll to the next block.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey, 2016-04-18
@Meller008

Your query building logic is slightly wrong. First, group the Order_position and Order_other tables by GROUP BY Order_id. And then combine them with the order.
Added code:

SELECT O.ID
  ,O.Customer
  ,x.Summ
  ,y.summ
FROM ORDER O
LEFT JOIN (
  SELECT order_id
    ,SUM(Price * Value) AS summ
  FROM Order_other
  GROUP BY order_id
  ) x ON O.Id = x.Order_id
LEFT JOIN (
  SELECT order_id
    ,SUM(Weight) AS summ
  FROM Order_position
  GROUP BY order_id
  ) y ON O.Id = y.Order_id

N
nozzy, 2016-04-18
@nozzy

select
t3.id,
t3.Customer,
t3.weight,
t4.others
from
(
  select
  t1.id,
  t1.Customer,
  t2.weight
  from Order t1
  inner join 
  (
    select
    Order_id,
    sum(Weight) as weight
    from Order_position
    group by Order_id
  ) t2 on t2.Order_id = t1.id
) t3 
  inner join
  (
    select
    Order_id,
    sum(Price * Value) as others
    from Order_other
    group by Order_id
  ) t4 on t4.Order_id = t3.id

W
WebDev, 2016-04-18
@kirill-93

Add GROUP BY Order.id to the end of the query

V
Valentin Melnik, 2019-01-29
@Poincare

The necessary can be done using fancybox

J
Jupiter Max, 2019-01-12
@vardoLP

this one is perfect for everything

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question