Insite,
still not working, I tried it both with the item field set to unique and not. Is there a log for mysql errors?
$data = array(
'item' => $post_array['cost_center'],
'campaign' => $this->session->userdata('campaign'),
'userid' => $this->session->userdata('userid')
);
$string="INSERT IGNORE INTO exclude_choices(item, campaign, userid) VALUES (" . $this->db->escape($data[item]) . ", " .$this->db->escape($data[campaign]) . ", " .$this->db->escape($data[userid]) . ")";
$this->db->query($string);
You realize that this is being called within a callback and the original table in the controller is "employees" and not "exclude_choices"? I found some mention of moving the code dealing with another table into a function in "model" rather than in the controller. Any commentary on this plan?
proof that an old dog can learn new tricks