The student is back. Thanks for you help an patience ;)
I'm using a foreach loop like this:
foreach ($value as $val)
{
//coming from database, from a select query:
$points = $row['points'];
//now I want to update another database table:
$sql = "update user set totalpoints=".$points." where userid=".$uid." ";
//but by doing this, table user is updated with the value of $points in the last iterarion
}
What do I have to do to update my table with the summation of $points and not with the value of the last iteration?
Thanks again