fix
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
class Dash_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function dashData() {
|
||||
$data = [];
|
||||
$data["new_patient"] = $this->db->query("SELECT id FROM members WHERE acc_link IS NULL AND status = 1")->num_rows();
|
||||
$data["establish_pateint"] = $this->db->query(" SELECT id FROM members WHERE acc_link IS NOT NULL AND status = 1")->num_rows();
|
||||
$data['deleted_users'] = $this->db->query(" SELECT id FROM members WHERE status <> 1")->num_rows();
|
||||
$data["new_patient_percent"] = ceil(100 * $data["establish_pateint"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
$data["establish_pateint_percent"] = ceil(100 * $data["new_patient"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user