Fixed item type bug.

This commit is contained in:
2022-10-17 16:45:22 -05:00
parent 1fa0f28174
commit 34d918d49e

View File

@ -70,7 +70,11 @@ ORDER BY books_languages_link.item_order");
// ---------- Pull data from tags table to dertermine type ----------
$type = $db->query("SELECT SUBSTR(name, 15) as itemtype from tags where name like 'infopump%';");
$type = $db->query("SELECT SUBSTR(name,15) AS itemtype FROM tags
INNER JOIN books_tags_link
ON books_tags_link.tag = tags.id
WHERE tags.name LIKE 'infopump-type%'
AND books_tags_link.book = '$ItemID'");
while ($row = $type->fetchArray()) {
$row_type = $row['itemtype'];