0

I don't know how can I update data in column instead of replacing it. For example now I made simple purchase system and when someone make payment, his old data in the column if it was 5 and the purchase value if its 10, its not going 15 its automatically replacing the old data and adding the new one = 10. Here is the code:

public function updateCoinsRewards($data){
    $IGN = $this->session->userdata['Player_Logged']['id'];

    $update = $this->db->where('id', $IGN);
    $update = $this->db->update($this->CoinsRewards,$data);
    return $update?true:false;
}

I tried to make data update instead data replace but didn't make it. Expectation is instead of replacing old data as I said, to add the new one.

9

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.