A
A
Anna2017-08-23 21:17:01
MySQL
Anna, 2017-08-23 21:17:01

What query is needed here for the mysql table?

There are three tables:
joxi.ru/DrlQnngUv8Odkm
What query should I write to display selected products of a particular user (with id 1, for example)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2017-08-23
@Virall

SELECT p.*
FROM users u
JOIN favorites f ON f.userid = u.id
JOIN products p ON p.id = f.videoid
WHERE u.id = 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question