2023-10-30 11:15:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Setup_model extends CI_Model {
|
|
|
|
|
|
|
|
function getCountryCount() {
|
2023-10-31 07:29:12 +00:00
|
|
|
$sql = 'select count(*) as count from dxcc_entities';
|
|
|
|
$query = $this->db->query($sql);
|
2023-10-30 11:15:08 +00:00
|
|
|
|
2023-10-31 07:29:12 +00:00
|
|
|
return $query->row()->count;
|
2023-10-30 11:15:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getLogbookCount() {
|
|
|
|
$userid = xss_clean($this->session->userdata('user_id'));
|
2023-10-31 07:29:12 +00:00
|
|
|
$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
|
|
|
|
2023-10-31 07:29:12 +00:00
|
|
|
return $query->row()->count;
|
2023-10-30 11:15:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getLocationCount() {
|
|
|
|
$userid = xss_clean($this->session->userdata('user_id'));
|
2023-10-31 07:29:12 +00:00
|
|
|
$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
|
|
|
|
2023-10-31 07:29:12 +00:00
|
|
|
return $query->row()->count;
|
2023-10-30 11:15:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|