Cloudlog/application/models/Setup_model.php

30 lines
699 B
PHP
Raw Normal View History

2023-10-30 11:15:08 +00:00
<?php
class Setup_model extends CI_Model {
function getCountryCount() {
$sql = 'select count(*) as count from dxcc_entities';
$query = $this->db->query($sql);
2023-10-30 11:15:08 +00:00
return $query->row()->count;
2023-10-30 11:15:08 +00:00
}
function getLogbookCount() {
$userid = xss_clean($this->session->userdata('user_id'));
$sql = 'select count(*) as count from station_logbooks where user_id =' . $userid;
$query = $this->db->query($sql);
2023-10-30 11:15:08 +00:00
return $query->row()->count;
2023-10-30 11:15:08 +00:00
}
function getLocationCount() {
$userid = xss_clean($this->session->userdata('user_id'));
$sql = 'select count(*) as count from station_profile where user_id =' . $userid;
$query = $this->db->query($sql);
2023-10-30 11:15:08 +00:00
return $query->row()->count;
2023-10-30 11:15:08 +00:00
}
}
?>