query("SELECT id, title, date(timestamp), author_sort, strftime('%Y',pubdate) AS pubyear, date(last_modified) FROM books WHERE id = '$ItemID'"); while ($row = $book->fetchArray()) { $row_id = $row['id']; $row_title = $row['title']; $row_created = $row['date(timestamp)']; $row_author_sort = $row['author_sort']; $row_pubdate = $row['pubyear']; $row_modified = $row['date(last_modified)']; } // ---------- Pull data from authors table ---------- $author = $db->query("SELECT name FROM authors INNER JOIN books_authors_link ON books_authors_link.author = authors.id WHERE books_authors_link.book = '$ItemID'"); while ($row = $author->fetchArray()) { $row_creator = $row['name']; } // ---------- Pull data from comments table ---------- $summary = $db->query("SELECT text FROM comments WHERE book = '$ItemID'"); while ($row = $summary->fetchArray()) { $row_summary = $row['text']; } // ---------- Pull data from publishers table ---------- $publisher = $db->query("SELECT name from publishers INNER JOIN books_publishers_link ON books_publishers_link.publisher = publishers.id WHERE books_publishers_link.book = '$ItemID'"); while ($row = $publisher->fetchArray()) { $row_publisher = $row['name']; } // ---------- Pull data from tags table ---------- $tags = $db->query("SELECT name FROM tags INNER JOIN books_tags_link ON books_tags_link.tag = tags.id WHERE tags.name NOT LIKE 'infopump%' AND books_tags_link.book = '$ItemID'"); // ---------- Pull data from identifiers table ---------- $identifiers = $db->query("SELECT type, val FROM identifiers WHERE book = '$ItemID'"); // ---------- Pull data from languages table ---------- $languages = $db->query("SELECT languages.lang_code AS lang_code FROM languages INNER JOIN books_languages_link ON books_languages_link.lang_code = languages.id WHERE book = '$ItemID' 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%';"); while ($row = $type->fetchArray()) { $row_type = $row['itemtype']; } // -------------------- END DATABASE QUERIES -------------------- ?> Item Record: '.$row_Title.''; ?>
Close
Infopump Avatar

About the Project

Infopump

A bibliographic management and display system.

Search

Item Record '.$ItemID.'';?>
Prev Next
';?>
'.$row_title.'';?> '.$row_creator.'';?>

Metadata

Item Control Number: '.$ItemID.'
'; echo 'Title: '.$row_title.'
'; echo 'Creator: '.$row_author_sort.'
'; echo 'Publisher: '.$row_publisher.'
'; echo 'Date: '.$row_pubdate.'
'; echo 'Type: '.$row_type.'
'; echo 'Subjects: '; while ($row = $tags->fetchArray()) { $row_tags = $row['name']; echo '['.$row_tags.'] '; } echo '
Identifiers:
'; while ($row = $identifiers->fetchArray()) { $row_id_type = $row['type']; $row_id_val = $row['val']; echo ''.$row_id_type.': ' .$row_id_val.'
'; } echo 'Language(s): '; while ($row = $languages->fetchArray()) { $row_lang_code = $row['lang_code']; echo '[ '.$row_lang_code.' ] '; } echo '
Created: '.$row_created.'
'; echo 'Last Modified: '.$row_modified; ?>