Updated process to pull type from db.

This commit is contained in:
2023-07-18 21:24:54 -05:00
parent c43e0ba088
commit 31817b29eb

View File

@ -97,16 +97,27 @@ 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
/*$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'];
}*/
$type = $db->query("SELECT custom_column_1.value AS itemtype
FROM books_custom_column_1_link
INNER JOIN custom_column_1
ON custom_column_1.id = books_custom_column_1_link.value
WHERE books_custom_column_1_link.book = '$ItemID'");
while ($row = $type->fetchArray()) {
$row_type = $row['itemtype'];
}
// -------------------- END DATABASE QUERIES --------------------
?>