View difference between Paste ID: bKpxjtXk and sqrF3rgv
SHOW: | | - or go back to the newest paste.
1
<?php
2
public function add_data($data = NULL) {
3
			if ($data === NULL) {
4
				return FALSE;
5
			} else {
6-
					if(!$this->db->set($name, $value)->field_exists($name, 'tbl_pengguna')){ $this->db->reset_query(); return FALSE; }
6+
7-
					$this->db->set($name, $value);
7+
					if(!$this->db-> field_exists($name, 'tbl_pengguna')){ 
8
						//$this->db->reset_query(); 
9
						return FALSE; 
10
					}
11
					//$this->db->set($name, $value);
12
				}
13
			}
14
            
15
            return $this->db->set("id_pengguna", "UUID()", FALSE)->insert("tbl_pengguna", $data);
16
        }