PATCH: Fixed database not returning data in recommendations
UPDATE: Decreased polling time to 1 second for later use
This commit is contained in:
@@ -66,6 +66,4 @@ SELECT * FROM tags;
|
||||
SELECT * FROM stream_tags;
|
||||
|
||||
-- To see all tables in the database
|
||||
SELECT name FROM sqlite_master WHERE type='table';
|
||||
|
||||
INSERT INTO users
|
||||
SELECT name FROM sqlite_master WHERE type='table';
|
||||
@@ -60,3 +60,11 @@ CREATE TABLE followed_categories
|
||||
FOREIGN KEY(category_id) REFERENCES categories(category_id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
SELECT s.stream_id, s.title, u.username, s.num_viewers, c.category_name
|
||||
FROM streams AS s
|
||||
JOIN users AS u ON u.user_id = s.user_id
|
||||
JOIN categories AS c ON s.category_id = c.category_id
|
||||
JOIN followed_categories AS f ON s.category_id = c.category_id
|
||||
WHERE f.user_id = ?
|
||||
ORDER BY s.num_viewers DESC
|
||||
LIMIT 25;
|
||||
Reference in New Issue
Block a user