This is my working script! try it
$inserting_data=array('user_id'=>$user_id, 'user_name'=>$user_name, 'id'=>$product_id, 'cost'=>$click_cost, 'price'=>$current_winner_amount, 'auction_price'=>$new_value, 'date'=>$this->general->get_local_time('time'), 'type'=>'A'); $insert_query = $this->db->insert_string('mytbl', $inserting_data); $insert_query = str_replace('INSERT INTO', 'INSERT IGNORE INTO', $insert_query); $this->db->query($insert_query);
source share