php - How do I UPDATE a value in a DB and add another value to it -
what wish update value stored in db same value + value.
example:
$points=$_post['points']; $ptsupdt = "update kids set points = points + '$points' name='$name'";
currently when run statement, adds double value stored in $points.
example: if $points=5 updated value original value + 10.
just don't quote $points!
$ptsupdt = "update kids set points = points + $points name = '$name'";
Comments
Post a Comment