mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-28 03:10:11 +01:00
28 lines
508 B
PHP
28 lines
508 B
PHP
<?php
|
|
|
|
class ModelStatCounter extends Model {
|
|
|
|
public function get_counters(){
|
|
$counter = array();
|
|
$asize = $ssize = 0;
|
|
|
|
$query = $this->db->query("SELECT * FROM " . TABLE_COUNTER);
|
|
|
|
if($query->num_rows == 1) {
|
|
$asize = $query->row['size'];
|
|
$ssize = $query->row['stored_size'];
|
|
|
|
unset($query->row['size']);
|
|
unset($query->row['stored_size']);
|
|
|
|
$counter = $query->row;
|
|
}
|
|
|
|
return array ($asize, $ssize, $counter);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
?>
|