Answer the question
In order to leave comments, you need to log in
How to implement the search for elements by criteria?
There are three tables - Item , Detail and DetailsItem . Between themselves, they create a many-to-many relationship. How can I implement an Item search for a specific Detail .
For example, there is a hammer. It consists of several parts such as: iron , wood , copper . I need to find this hammer by detail. For example, I drive in parameters such as wood and copper , which will definitely find the desired element, but if I add an additional parameter such as silicone , then this element is discarded.
Also, these parameters may contain other elements that contain iron , wood and copper , but if one of the parameters does not match, then the element should not be displayed in the final selection.
SELECT item.idItem, detail.idDetail, detail.title FROM item
JOIN details_item ON item.idItem = details_item.idItem
JOIN detail ON detail.idDetail = details_item .idDetail
WHERE detail.title in ("Железо","Дерево","Медь")
Answer the question
In order to leave comments, you need to log in
More or less like this:
SELECT item.title FROM (
SELECT
item.idItem
FROM item
JOIN details_item ON item.idItem = details_item.idItem
JOIN detail ON detail.idDetail = details_item .idDetail
GROUP BY item.idItem
HAVING sum(CASE
WHEN detail.title in ("Железо","Дерево","Медь")
THEN 1
ELSE 0 END) = 3
) t
JOIN item ON item.idItem = t.idItem
In fact, in the figure, the function x \ u003d
a * sin (b * y) We put the origin in the center of the canvas, animate by changing the coefficient b in certain ranges (you need to select experimentally)
It is possible without canvas and without mathematics.
Make up three vertical stripes with gradients. This is the first layer. Make up white triangles - the third layer. And in the second layer, put your wavy line, and move it up or down, in a circle.
Although, maybe I misunderstood what a "smooth oscillation animation" is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question