使用mysqli使用INNER JOIN更新表

I am trying to update a table with using INNER JOIN. What I am trying to do is to get the 'username' which has the 'code' value, and update a value of that "username" on another table.

I tried this:

$pbr = $conn->prepare("UPDATE p 
                       SET p.pay = p.pay + 10 
                       FROM points AS p 
                       INNER JOIN members AS m 
                       ON p.username = m.username 
                       WHERE m.code = ?");
$pbr->bind_param("s", $code);

That gives me "Fatal error: Call to a member function bind_param() on a non-object "

I searched and found some questions like mine but I can't solve this. I used var_dump($pbr); and it gives "boolean false", but I can't see where the problem is.

The query should look like this:

$pbr = $conn->prepare("UPDATE points p 
                       INNER JOIN members AS m 
                       ON p.username = m.username 
                       SET p.pay = p.pay + 10 
                       WHERE m.code = ?");