fix query for filtered media requests
This commit is contained in:
parent
ad1a35296a
commit
a9fb3b816b
@ -13,7 +13,14 @@
|
|||||||
}
|
}
|
||||||
} else if (isset($_GET['filter']) && trim($_GET['filter']) !== "") {
|
} else if (isset($_GET['filter']) && trim($_GET['filter']) !== "") {
|
||||||
// get info about a subset of media files
|
// get info about a subset of media files
|
||||||
$query = $db->prepare("SELECT * FROM media m
|
$query = $db->prepare("SELECT m.id AS id,
|
||||||
|
m.title,
|
||||||
|
m.description,
|
||||||
|
m.season,
|
||||||
|
m.episode_number,
|
||||||
|
m.duration_secs,
|
||||||
|
m.source_path
|
||||||
|
FROM media m
|
||||||
JOIN media_tags mt ON m.id = mt.media_id
|
JOIN media_tags mt ON m.id = mt.media_id
|
||||||
JOIN tags t ON mt.tag_id = t.id
|
JOIN tags t ON mt.tag_id = t.id
|
||||||
WHERE m.title LIKE :filter
|
WHERE m.title LIKE :filter
|
||||||
|
Loading…
Reference in New Issue
Block a user