BookTracker Analytics

Member Loan Statistics ()

query("SELECT * FROM get_member_history()"); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); if(count($results) > 0) { foreach($results as $row) { $startDate = new DateTime($row['startdate']); $formattedDate = $startDate->format('F'); echo ""; } } else { echo ""; } } catch(PDOException $e) { echo ""; } ?>
Member Status Month Total Loans Current Loans Total Fines Fines Amount Paid Amount
{$row['membername']} {$row['membershipstatus']} {$formattedDate} {$row['totalloans']} {$row['currentloans']} {$row['totalfines']} $".number_format($row['totalfineamount'], 2)." $".number_format($row['totalpayments'], 2)."
No member statistics available for " . date('Y') . ".
Error loading member statistics: " . $e->getMessage() . "

Book Loan Statistics

query("SELECT * FROM get_book_loan_stats()"); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); if(count($results) > 0) { foreach($results as $row) { echo ""; } } else { echo ""; } } catch(PDOException $e) { echo ""; } ?>
Title Avg Days Min Days Max Days Total Loans Loans with Fines
{$row['title']} ".number_format($row['avgdaystoreturn'], 1)." {$row['mindaystoreturn']} {$row['maxdaystoreturn']} {$row['totalloans']} {$row['loanswithfines']}
No book statistics found.
Error loading book statistics: " . $e->getMessage() . "