Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function listunreadmember_post()
- {
- $username = trim($this->post('username'));
- if ($username == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Username Kosong.',
- ];
- } else {
- $this->db->where('user_tujuan', $username);
- $this->db->where('notifikasi_status', 1);
- $this->db->from('bpmppt_notifikasi');
- $total = $this->db->count_all_results();
- if ($total > 0) {
- $response = [
- 'resp_error' => false,
- 'jumlah' => $total,
- ];
- } else {
- $response = [
- 'resp_error' => false,
- 'resp_msg' => 'Tidak Ada Data Notifikasi.',
- ];
- }
- }
- $this->response($response, 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement