I'm looping through results from one table and want to update another table each time.
For example I have a Users table and with UserID and UserPoints. I'm looping through a Feedback table and am getting all the points scored on a particular user.
What I would deem to be bad coding is for each feedback row selecting the user from the users table, getting the existing points, adding the feedback points to it and then updating the row.
Is there a way I can do something like this?
UPDATE Users SET UserPoints = (UserPoints + $FeedbackPoints) WHERE UserID = $ID
I know I could do a count join search but there are fields here which i why i want this set up like below.