diff --git a/adminwww/application/models/Dash_model.php b/adminwww/application/models/Dash_model.php new file mode 100644 index 0000000..4a6058c --- /dev/null +++ b/adminwww/application/models/Dash_model.php @@ -0,0 +1,20 @@ +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; + } + +}