What causes this error?:

> 
> Invalid use of group functions
> 
> 
> 

Here is the sql code causing the error:

```
$sql_data = "UPDATE `database1`.`users` SET `balance` = MIN(`balance` + 5) 
WHERE ('" . $session->value('user_id') . "') ";

```