I wish to update a field in my database, to the current value, plus another value.
For some reason, below code doesn't work - although I don't receive any PHP error:
$stmt = $dbh->prepare("UPDATE users SET rbalance=rbalance+':amount', alertpay_invest=alertpay_invest+':amount' WHERE id=':userid'"); //Works
$stmt->bindParam(':amount', $amount);
$stmt->bindParam(':userid', $itemType[0]);
$stmt->execute();
Can someone please help me?
I am new to PDO, and I don't know how to enable error debugging either..