Hi,
I wanted to do this:
PHP Code:
$data = array(
'current_amount' => $newAmount,
'time_lastupdate' => time()
);
$where = $this->db->quoteInto('user_id = ?', $userid);
$row_affected = $this->db->update('users_credits', $data, $where);
// Add new record to credits history
$data = array(
'action' => $actiontype,
'code' => $code,
'amount' => $amount,
'userid' => $userid,
'comment' => $comment,
'time' => time()
);
$this->db->insert('users_credit_history', $data);
But only the first command (update()) is executed correctly the other isn't and I get no error message or anything like that :s
Can anyone help me out here?
Thanks!