<?php
 class RadlogDB extends ADO { public function __construct( $app, $dburi, $debug=false, $tmode=true, $dformat='') { $this->owner = $app; if ( !empty($dburi)) $this->dburi = $dburi; return parent::__construct( $this->dburi, $debug, $tmode, $dformat); } public function get_records($lines_per_page, $page=0) { $res = $this->GetAll("SELECT count(*) FROM sk_Radlog"); $limits = false; if ( $page >= 0) { $low = $page*$lines_per_page; $high = $lines_per_page; $limits = true; } $query = "SELECT Rad_time, Rad_msg FROM sk_Radlog ORDER BY insertion_time DESC"; if ( $limits) { $query .= ' OFFSET '.$low.' LIMIT '.$high; } $allRecs = $this->GetAll($query); return array($res[0][0], $allRecs); } } ?>
