Question: I am relatively new to programming with PHP. 

I have created a simple Javascript game and I have managed to insert the player's current score into the database. I have two fields, current score and highest score for the player. How do I check if the player's current score is higher than his highest score and update the highest score?

Answer: 
An update statement setting the current score and possibly updating the highest score per user:

```
UPDATE `scores` SET `current_score` = ?, `high_score` = GREATEST(`high_score`, ?)
WHERE `user` = ....

```

Substitute `?` for the score.
After inserting the current score you could run the following query:

```
UPDATE scores
SET high_score = current_score
WHERE current_score > high_score

```