<?php include_once "../../includes/easyparliament/init.php"; $this_page = "admin_statistics"; $db = new ParlDB(); $PAGE->page_start(); $PAGE->stripe_start(); ?> <h4>Hansard data in database</h4> <?php $DEBATELIST = new DEBATELIST(); $debate_items = $DEBATELIST->total_items(); $WRANSLIST = new WRANSLIST(); $wrans_items = $WRANSLIST->total_items(); $debate_speeches = $DEBATELIST->total_speeches(); $wrans_questions = $WRANSLIST->total_questions(); $q = $db->query("SELECT min(hdate) as mindate, max(hdate) as maxdate from hansard"); $datefrom = format_date($q->field(0, 'mindate'), SHORTDATEFORMAT); $dateto = format_date($q->field(0, 'maxdate'), SHORTDATEFORMAT); $q = $db->query("SELECT count(distinct hdate) as count from hansard"); $uniquedates = $q->field(0, 'count'); ?> <p><b><?php echo $datefrom; ?> </b> to <b><?php echo $dateto;