php - Must use set method -


i'm trying figure out why i'm getting error you must use "set" method update entry. when use following method. using jamie rumbelow's my_model this.

$this->failed_login->insert_login_attempt($this->input->ip_address(),                                  $post_username,                                 gmdate('y-m-d h:i:s', time()));   public function insert_login_attempt($user_ip_address, $username,                                  $datetime_of_attempt) {      $failed_attempt = array(         'user_ip_address' => $user_ip_address,         'username' => $username,         'datetime');     $this->db->insert($failed_attempt);  } 

$this->db->insert needs know table want insert table into. how know put data if don't give table? :-p

$failed_attempt = array(     'user_ip_address' => $user_ip_address,     'username' => $username,     'datetime' => $datetime_of_attempt);  $this->db->insert('your_table', $failed_attempt); 

edit: since using jamierumbelow's my_model, need follow docs.

$failed_attempt = array(     'user_ip_address' => $user_ip_address,     'username' => $username,     'datetime' => $datetime_of_attempt);  $this->insert($failed_attempt); // or $this->failed_login->insert($failed_attempt); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -